Simple OIDC provider for local-development of OpenID compatible applications
500K+
Simple OIDC provider using https://github.com/panva/node-oidc-provider and heavily based on the examples from https://github.com/panva/node-oidc-provider-example
docker run --rm -d -p 9000:9000 \
-e "REDIRECTS=https://myapp/login/callback" \
qlik/simple-oidc-provider
http://localhost:9000/.well-known/openid-configuration
The default configuration is the following:
foo and client_secret bar with allowed redirect http://localhost:9055/v1/authenticate/callback will be createdThe simplest configuration can be accomplished using environment variables
| Variable | Description | Default |
|---|---|---|
| REDIRECTS | A comma separated string of the allowed callback urls | http://localhost:9055/v1/authenticate/callback |
| PORT | A value for the port to run the server on | 9000 |
| PATH_PREFIX | A value for the prefix to add for forms to POST to (e.g. "/oidc" will make the login form post to "/oidc/interaction/*") | "" |
| IDP_NAME | A value for the name/url of the IDP | http://simple-oidc-provider |
| CONFIG_FILE | A path to the configuration file (values overrides) | |
| USERS_FILE | A path to the custom users file |
The rest of the configuration will be from the default configuration
A configuration file can be specified by setting the CONFIG_FILE environment variable to the path to the file. This configuration will be merged with the default config so that any none specified values will take on the default value.
{
"idp_name": "http://simple-oidc-provider",
"port": 9000,
"client_config": [
{
"client_id": "foo",
"client_secret": "bar",
"redirect_uris": [
"http://localhost:9055/v1/authenticate/callback"
]
}
],
"claim_mapping": {
"openid": [ "sub" ],
"email": [ "email", "email_verified" ],
"profile": [ "name", "nickname" ]
}
}
A users file can be specified by setting the USERS_FILE environment variable to the path to the file. The file must be formatted as a JSON array of objects representing users. The user objects must have an id property. The remaining fields consist of the claims which may be returned based on the scopes requested during the OIDC flow. The mapping of the claims to scopes is controlled by the configuration field claim_mapping.
The default users are the following
[
{
id: 'SIMPLE_OIDC_USER_HARLEY',
email: '[email protected]',
email_verified: true,
name: 'Harley Kiffe',
nickname: 'harley',
password: 'Password1!',
groups: ['Everyone', 'Sales']
},
{
id: 'SIMPLE_OIDC_USER_BARB',
email: '[email protected]',
email_verified: true,
name: 'Barb Stovin',
nickname: 'barb',
password: 'Password1!',
groups: ['Everyone', 'Support']
},
{
id: 'SIMPLE_OIDC_USER_QUINN',
email: '[email protected]',
email_verified: true,
name: 'Quinn Leeming',
nickname: 'quinn',
password: 'Password1!',
groups: ['Everyone', 'Accounting']
},
{
id: 'SIMPLE_OIDC_USER_SIM',
email: '[email protected]',
email_verified: true,
name: 'Sim Cleaton',
nickname: 'sim',
password: 'Password1!',
groups: ['Everyone', 'Accounting']
},
{
id: 'SIMPLE_OIDC_USER_PHILLIE',
email: '[email protected]',
email_verified: true,
name: 'Phillie Smeed',
nickname: 'phillie',
password: 'Password1!',
groups: ['Everyone', 'Marketing', 'Sales']
},
{
id: 'SIMPLE_OIDC_USER_PETA',
email: '[email protected]',
email_verified: true,
name: 'Peta Sammon',
nickname: 'peta',
password: 'Password1!',
groups: ['Everyone', 'Engineering']
},
{
id: 'SIMPLE_OIDC_USER_MARNE',
email: '[email protected]',
email_verified: true,
name: 'Marne Probetts',
nickname: 'marne',
password: 'Password1!',
groups: ['Everyone', 'Marketing']
},
{
id: 'SIMPLE_OIDC_USER_SIBYLLA',
email: '[email protected]',
email_verified: true,
name: 'Sibylla Meadows',
nickname: 'sibylla',
password: 'Password1!',
groups: ['Everyone', 'Accounting']
},
{
id: 'SIMPLE_OIDC_USER_EVAN',
email: '[email protected]',
email_verified: true,
name: 'Evan Highman',
nickname: 'evan',
password: 'Password1!',
groups: ['Everyone', 'Engineering']
},
{
id: 'SIMPLE_OIDC_USER_FRANKLIN',
email: '[email protected]',
email_verified: true,
name: 'Franklin Glamart',
nickname: 'franklin',
password: 'Password1!',
groups: ['Everyone', 'Sales']
}
]
simple-oidc-provider to HerokuYou will need the following:
The Heroku Command Line Interface (CLI) makes it easy to create and manage your Heroku apps directly from the terminal. Please follow this link for more information:
https://devcenter.heroku.com/articles/heroku-cli
You must first create an app in heroku.
export APP_NAME=$(heroku apps:create --json | jq -r '.name')
heroku config:set REDIRECTS=https://myApp/login/callback --app $APP_NAME
simple-oidc-provider docker image to Herokudocker pull qlik/simple-oidc-provider
heroku container:login
docker tag qlik/simple-oidc-provider:latest registry.heroku.com/$APP_NAME/web
docker push registry.heroku.com/$APP_NAME/web
heroku container:release web --app $APP_NAME
url:echo https://$APP_NAME.herokuapp.com/.well-known/openid-configuration
Content type
Image
Digest
Size
51.4 MB
Last updated
about 5 years ago
docker pull qlik/simple-oidc-provider