Skip to content

A simple Docker image for testing CAS SSO with phpCAS client library

Notifications You must be signed in to change notification settings

gunet/phpcas-tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

296c0e8 · Jan 23, 2025

History

51 Commits
Dec 7, 2024
Jun 26, 2023
Mar 2, 2023
Jan 9, 2024
Mar 2, 2023
Jul 3, 2023
Nov 29, 2023
Jan 23, 2025
Dec 20, 2023
Mar 17, 2023
Jun 26, 2023
Mar 18, 2023

Repository files navigation

Description

A simple Docker image for testing CAS login (and attributes) using the phpCAS library Docker Hub image: gunet/phpcas-tester

Main files

  • docker-compose.yaml
    • Builds the project (altough you can also download the image from Docker Hub). Run docker compose build
    • Includes the variables.env environment variables file
    • Exposes port 443
  • docker-compose.volume.yaml
    • Volume mount the code folder
  • docker-compose.test.yaml
    • Includes the gunet/simple-cas and gunet/simple-ldap Docker images in order to allow the compose stack to be self-contained
    • Just point your browser to https://localhost and things should work!
    • Volume mounts the code folder into the tester container so that any changes to the php files are automatically reflected in the tester container.
    • Some test users:
      • test/test
      • auser/auser
  • variables.env: Environment variables file By default, it is designed to assist the docker-compose.test.yaml stack
    • DEBUG variable sets debugging (mainly phpCAS debug)

Run

  • Edit variables.env if needed
  • Run docker compose up -d if we want to check an existing production CAS server
  • Run docker compose -f docker-compose.yaml -f docker-compose.test.yaml up -d if we want to run the test stack (Which includes a CAS and LDAP server)
  • Point browser to https://localhost

Environment Variables

  • CAS_SERVER: The hostname of the CAS server (default localhost)
  • CAS_CONTEXT: The CAS context. In the case of gunet/simple-cas it will be /cas, while in the case of a regulat CAS it will be ./ (default /cas)
  • CAS_PORT: The port where the CAS server is listening to (default 8443)
  • CAS_VERSION: The CAS protocol version (default 3.0). Available options are:
    • 3.0: CAS version 3.0
    • 2.0: CAS version 2.0
    • 1.0: CAS version 1.0
    • S1 : SAML v1.1
  • CAS_SERVICE_NAME: The service name to use for our service (default https://localhost)