Skip to content

Commit

Permalink
Rebuild on php8.2 and simpleSAML 2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
dancallan committed Nov 8, 2023
1 parent aed3713 commit 4b858b8
Show file tree
Hide file tree
Showing 31 changed files with 2,969 additions and 1,199 deletions.
54 changes: 43 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,55 @@
FROM php:5.6-apache
MAINTAINER Ian Blenke <[email protected]>
FROM php:8.2-apache

env VERSION 1.15.4
ENV COMPOSER_ALLOW_SUPERUSER=1
ENV VERSION=2.0.7

WORKDIR /var/www/html

RUN apt-get update -y && \
apt-get install -y wget && \
wget https://github.com/simplesamlphp/simplesamlphp/releases/download/v$VERSION/simplesamlphp-$VERSION.tar.gz && \
RUN apt-get update && \
apt-get -y --no-install-recommends install \
wget \
git \
re2c \
file \
unzip \
zlib1g-dev \
libicu-dev \
libmcrypt-dev \
libmhash-dev \
libonig-dev \
libpng-dev \
&& \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

RUN docker-php-ext-install -j5 \
bcmath \
gd \
intl \
mbstring \
mysqli \
pdo \
pdo_mysql \
&& \
pecl install \
mcrypt \
redis \
&& \
docker-php-ext-enable \
mcrypt \
redis

RUN wget https://github.com/simplesamlphp/simplesamlphp/releases/download/v$VERSION/simplesamlphp-$VERSION.tar.gz && \
tar xvzf simplesamlphp-$VERSION.tar.gz --strip-components 1 -C /var/www/html

RUN cp -r config-templates/* config/ && cp -r metadata-templates/* metadata/
RUN cp config/config.php.dist config/config.php && \
cp config/authsources.php.dist config/authsources.php && \
cp metadata/saml20-idp-hosted.php.dist metadata/saml20-idp-hosted.php && \
cp metadata/saml20-idp-remote.php.dist metadata/saml20-idp-remote.php && \
cp metadata/saml20-sp-remote.php.dist metadata/saml20-sp-remote.php

VOLUME /var/www/html/config
VOLUME /var/www/html/metadata

# Install the gmp and mcrypt extensions
RUN apt-get update -y && \
apt-get install -y git re2c libmhash-dev file

RUN curl -sS https://getcomposer.org/installer | php
RUN php composer.phar install
5 changes: 0 additions & 5 deletions Dockerfile.yours

This file was deleted.

5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# docker-simplesamlphp

This is a packaging of [simplesamlphp](http://simplesamlphp.org)
This is a packaging of [simplesamlphp](http://simplesamlphp.org) version 2.0.7

To use this image, you will want to make your own config/ and metadata/ folders
To use this image, you will want to make your own config/ and metadata/ folders (dist template folders are in this repo).

This can be done by mounting volumes under /var/lib/html/config and /var/lib/html/metadat, or by basing another image off of this one (take a look at Dockerfile.yours).
This can be done by mounting volumes under /var/www/html/config and /var/www/html/metadata, or by basing another image off of this one and copying the config/metadata files into that during build.

61 changes: 0 additions & 61 deletions config/acl.php

This file was deleted.

59 changes: 59 additions & 0 deletions config/acl.php.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php

/*
* This file defines "named" access control lists, which can
* be reused in several places.
*/
$config = [
'adminlist' => [
//['allow', 'equals', 'mail', '[email protected]'],
//['allow', 'has', 'groups', 'admin'],
// The default action is to deny access.
],

'example-simple' => [
['allow', 'equals', 'mail', '[email protected]'],
['allow', 'equals', 'mail', '[email protected]'],
// The default action is to deny access.
],

'example-deny-some' => [
['deny', 'equals', 'mail', '[email protected]'],
['allow'], // Allow everybody else.
],

'example-maildomain' => [
['allow', 'equals-preg', 'mail', '/@example\.org$/'],
// The default action is to deny access.
],

'example-allow-employees' => [
['allow', 'has', 'eduPersonAffiliation', 'employee'],
// The default action is to deny access.
],

'example-allow-employees-not-students' => [
['deny', 'has', 'eduPersonAffiliation', 'student'],
['allow', 'has', 'eduPersonAffiliation', 'employee'],
// The default action is to deny access.
],

'example-deny-student-except-one' => [
['deny', 'and',
['has', 'eduPersonAffiliation', 'student'],
['not', 'equals', 'mail', '[email protected]'],
],
['allow'],
],

'example-allow-or' => [
['allow', 'or',
['equals', 'eduPersonAffiliation', 'student', 'member'],
['equals', 'mail', '[email protected]'],
],
],

'example-allow-all' => [
['allow'],
],
];
86 changes: 0 additions & 86 deletions config/authmemcookie.php

This file was deleted.

Loading

0 comments on commit 4b858b8

Please sign in to comment.