-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Almost-working example using the mock-oidc-server for test and develo…
…pment purposes.
- Loading branch information
1 parent
97331ff
commit 9aadf96
Showing
9 changed files
with
123 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
authentication: | ||
providers: | ||
- provider: localhost | ||
authenticator: tiled.authenticators:OIDCAuthenticator | ||
args: | ||
audience: tiled # something unique to ensure received headers are for you | ||
# These values come from https://console.cloud.google.com/apis/credential | ||
client_id: tiled | ||
client_secret: secret | ||
well_known_uri: http://localhost:8080/.well-known/openid-configuration | ||
trees: | ||
# Just some arbitrary example data... | ||
# The point of this example is the authenticaiton above. | ||
- tree: tiled.examples.generated_minimal:tree | ||
path: / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[ | ||
{ | ||
"ClientId": "tiled", | ||
"ClientSecrets": ["secret"], | ||
"Description": "Tiled web interface login", | ||
"AllowedGrantTypes": ["implicit"], | ||
"AllowedScopes": ["tiled", "openid", "profile", "email"], | ||
"RedirectUris": ["localhost:4000/*"], | ||
"AllowAccessTokensViaBrowser": true, | ||
"AccessTokenLifetime": 3600, | ||
"IdentityTokenLifetime": 3600 | ||
}, | ||
{ | ||
"ClientId": "blueapi", | ||
"ClientSecrets": ["secret"], | ||
"Description": "Blueapi CLI login", | ||
"AllowedGrantTypes": ["urn:ietf:params:oauth:grant-type:device_code"], | ||
"AllowedScopes": ["blueapi", "openid", "profile", "email", "offline_access"], | ||
"AccessTokenLifetime": 3600, | ||
"IdentityTokenLifetime": 3600, | ||
"AllowOfflineAccess": true, | ||
"Claims": [{ | ||
"Type": "aud", | ||
"Value": "blueapi", | ||
"ValueType": "string" | ||
}] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
services: | ||
oidc-server-mock: | ||
container_name: oidc-server-mock | ||
image: ghcr.io/soluto/oidc-server-mock:latest | ||
ports: | ||
- 8080:80 | ||
environment: | ||
ASPNETCORE_ENVIRONMENT: Development | ||
ASPNETCORE_URLS: http://+:80 | ||
# ASPNETCORE_Kestrel__Certificates__Default__Password: <password for pfx file> | ||
# ASPNETCORE_Kestrel__Certificates__Default__Path: /path/to/pfx/file | ||
SERVER_OPTIONS_INLINE: | | ||
{ | ||
"AccessTokenJwtType": "JWT", | ||
"Discovery": { | ||
"ShowKeySet": true | ||
}, | ||
"Authentication": { | ||
"CookieSameSiteMode": "Lax", | ||
"CheckSessionCookieSameSiteMode": "Lax" | ||
} | ||
} | ||
LOGIN_OPTIONS_INLINE: | | ||
{ | ||
"AllowRememberLogin": false, | ||
"AllowOfflineAccess": true | ||
} | ||
LOGOUT_OPTIONS_INLINE: | | ||
{ | ||
"AutomaticRedirectAfterSignOut": true | ||
} | ||
API_SCOPES_INLINE: | | ||
- Name: blueapi | ||
- Name: tiled | ||
API_RESOURCES_INLINE: | | ||
- Name: app | ||
Scopes: | ||
- blueapi | ||
- tiled | ||
USERS_CONFIGURATION_INLINE: | | ||
[ | ||
{ | ||
"SubjectId":"1", | ||
"Username":"user", | ||
"Password":"password", | ||
"Claims": [ | ||
{ | ||
"Type": "name", | ||
"Value": "Joe Bloggs", | ||
"ValueType": "string" | ||
}, | ||
{ | ||
"Type": "email", | ||
"Value": "joe.bloggs@diamond.ac.uk", | ||
"ValueType": "string" | ||
} | ||
] | ||
} | ||
] | ||
CLIENTS_CONFIGURATION_PATH: /tmp/config/clients-config.json | ||
ASPNET_SERVICES_OPTIONS_INLINE: | | ||
{ | ||
"BasePath": "/foo", | ||
"ForwardedHeadersOptions": { | ||
"ForwardedHeaders" : "All" | ||
} | ||
} | ||
volumes: | ||
- .:/tmp/config:ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.