A sample on how to use auth-openidc with OAuth and authorization
1.1K
This is a sample docker container used to test OpenID Connect and OAuth2.
docker pull fhakamine/auth-openidc
sudo docker run -d --name sso -p 80:80 -p 443:443 \
-e OIDCPROVIDERMETADATAURL='https://ice.okta.com/.well-known/openid-configuration' \
-e OIDCCLIENTID='client_id' -e OIDCCLIENTSECRET='client_secret' \
-e REDIRECTDOMAIN='https://localhost' -e REV_PROXY='https://www.google.com' fhakamine/auth-openidc
Important: Requires you to configure Docker Cloud and link your PaaS account first: https://docs.docker.com/docker-cloud/getting-started/
OIDCPROVIDERMETADATAURL: Your authorization server URL. For example: https://ice.okta.com/.well-known/openid-configurationOIDCCLIENTID: Client ID that identifies your HTTP server.OIDCCLIENTSECRET: Client secret for your HTTP server.OIDCScope: Scopes/claims you want to request in the OAuth flow.OIDCCRYPTOPASSPHRASE and OIDCSCRUBREQUESTHEADERS (optionals): Secret and flag for encrypting the state token and the request headers.REV_PROXY: The server you set will be reverse proxied under "/rev". For example, if you set REV_PROXY=https://my.intranet.com, https://localhost/rev/appX will go to https://my.intranet.com/appXAPIURL: If you decide to test an API authorization, you can add the API endpoint here.sudo docker run -d --name sso -p 80:80 -p 443:443 \
-e OIDCPROVIDERMETADATAURL='https://ice.okta.com/.well-known/openid-configuration' \
-e OIDCCLIENTID='client_id' -e OIDCCLIENTSECRET='client_secret' \
-e REDIRECTDOMAIN='https://localhost' -e REV_PROXY='https://www.google.com' fhakamine/auth-openidc
sudo docker run -d --name apiam -p 80:80 -p 443:443 \
-e OIDCPROVIDERMETADATAURL='https://ice.okta.com/oauth2/abcd1234/.well-known/openid-configuration' \
-e OIDCCLIENTID='client_id' -e OIDCCLIENTSECRET='client_secret' \
-e REDIRECTDOMAIN='https://localhost' -e REV_PROXY='https://www.google.com' fhakamine/auth-openidc
sudo docker run -d --name apiam -p 80:80 -p 443:443 \
-e OIDCPROVIDERMETADATAURL='https://ice.okta.com/oauth2/abcd1234/.well-known/oauth-authorization-server' \
-e OIDCCLIENTID='client_id' -e OIDCCLIENTSECRET='client_secret' \
-e REDIRECTDOMAIN='https://localhost' -e REV_PROXY='https://www.google.com' \
-e SCOPES='openid profile email promos:read' -e APIURL='https://api.server/promos/' fhakamine/auth-openidc
docker build -t my-oidc .
This container is provided “AS IS” with no express or implied warranty for accuracy or accessibility. This container intended to demonstrate the basic integration between HTTP servers with OIDC and does not represent, by any means, the recommended approach or is intended to be used in development or productions environments.
Content type
Image
Digest
Size
338.9 MB
Last updated
about 9 years ago
docker pull fhakamine/auth-openidc