Sign inSign up

szabogyula/saml-webapp-runner

By szabogyula

Updated over 8 years ago

SAML micro federation to develop saml enabled webapps

Image
1

1.7K

szabogyula/saml-webapp-runner repository overview

Federated webapp runner for develop php application in federated environment

Warning: this container under strong development. Be careful!

Configure for local development

  • First, you need Docker enviroment on your machine
  • You need a mysql, or mariadb instance, if you don't have yet, it is easy to run in docker: docker run -d -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD="yes" mysql
  • Rename ansible/index.yml.dist to ansible/index.yml, then add your config options into this file (vars section)

Build

docker build -t szabogyula/saml-webapp-runner .

Run

Set resolving Edit your /etc/hosts file in your machine. All hostnames project.local must show to local Docker IP address, which is usually 192.168.99.100 project.local or on Ubuntu 16.04 127.0.0.1 project.local

You can override the default project.local hostname by environment variable: PROJECT_HOSTNAME

example:

docker run -d -p 80:80 -p 443:443 -p 8080:8080 -e PROJECT_HOSTNAME=example.com -v /path/to/webapp_project:/var/www/project szabogyula/saml-webapp-runner

Own logfiles to tailon Provide your interest logfiles into the LOGFILES environment variable, separate with commas:

docker run -d -p 80:80 -p 443:443 -p 8080:8080 -e LOGFILES=/var/www/project/var/logs/dev.log,/var/www/project/var/logs/prod.log -v /path/to/webapp_project:/var/www/project szabogyula/saml-webapp-runner

Run the docker container Run for development (adjust the example hostnames before running!): docker run -d -p 80:80 -p 443:443 -p 8080:8080 --add-host project.local:127.0.0.1 -v /path/to/webapp_project:/var/www/project szabogyula/saml-webapp-runner

Set the document root You can set the relative document root instead of web by set DOCUMENT_ROOT environment variable.

Access the webapp

  • 80 and 443 port is the application, and there is a tailon at 8080 port

Development

  • If you modify anything under /path/to/edugain-attribute-checker/www folder, you can try it immediatly, because the app reads this folder as DocumentRoot.

Use

IdP users

The users and his attributes that you can use.

        's:pass' => array(
            'eduPersonPrincipalName' => array('[email protected]'),
            'eduPersonScopedAffiliation' => array('[email protected]', '[email protected]'),
            'mail' => array('[email protected]'),
            'displayName' => 'Student Student',
            'eduPersonEntitlement' => array('a:permission:a'),

        ),
        'e:pass' => array(
            'eduPersonPrincipalName' => array('[email protected]'),
            'eduPersonScopedAffiliation' => array('[email protected]', '[email protected]'),
            'mail' => array('[email protected]'),
            'displayName' => 'Employee Employee',
            'eduPersonEntitlement' => array('a:permission:b'),
        ),
        'snolocal:pass' => array(
            'eduPersonPrincipalName' => array('[email protected]'),
            'eduPersonScopedAffiliation' => array('[email protected]', '[email protected]'),
            'mail' => array('[email protected]'),
            'displayName' => 'Student Student',
            'eduPersonEntitlement' => array('b:permission:a'),

        ),
        'enolocal:pass' => array(
            'eduPersonPrincipalName' => array('[email protected]'),
            'eduPersonScopedAffiliation' => array('[email protected]', '[email protected]'),
            'mail' => array('[email protected]'),
            'displayName' => 'Employee Employee',
            'eduPersonEntitlement' => array('b:permission:b'),
        ),

=======

Tag summary

Content type

Image

Digest

Size

285.6 MB

Last updated

over 8 years ago

docker pull szabogyula/saml-webapp-runner