Skip to content

Commit

Permalink
fix: expose oidc-server-mock port via ddev router in order to allow c…
Browse files Browse the repository at this point in the history
…ommunication between containers
  • Loading branch information
martipoe committed Aug 14, 2024
1 parent 46f4e6e commit e3d8a42
Showing 1 changed file with 21 additions and 48 deletions.
69 changes: 21 additions & 48 deletions .ddev/docker-compose.oidc-server-mock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ services:
# disable healthcheck as it is broken in latest versions: https://github.com/Soluto/oidc-server-mock/issues/151
healthcheck:
disable: true
# go to http://oauth.ddev.site:4011/
ports:
- '4011:8080'
environment:
ASPNETCORE_ENVIRONMENT: Development
SERVER_OPTIONS_INLINE: |
Expand All @@ -31,13 +28,14 @@ services:
"AutomaticRedirectAfterSignOut": true
}
API_SCOPES_INLINE: |
- Name: some-app-scope-1
- Name: some-app-scope-2
- Name: avatar
API_RESOURCES_INLINE: |
- Name: some-app
- Name: authentik
Scopes:
- some-app-scope-1
- some-app-scope-2
- openid
- profile
- email
- avatar
USERS_CONFIGURATION_INLINE: |
[
{
Expand All @@ -47,27 +45,17 @@ services:
"Claims": [
{
"Type": "name",
"Value": "Sam Tailor",
"Value": "Test User",
"ValueType": "string"
},
{
"Type": "email",
"Value": "sam.tailor@gmail.com",
"Value": "test.user@example.org",
"ValueType": "string"
},
{
"Type": "some-api-resource-claim",
"Value": "Sam's Api Resource Custom Claim",
"ValueType": "string"
},
{
"Type": "some-api-scope-claim",
"Value": "Sam's Api Scope Custom Claim",
"ValueType": "string"
},
{
"Type": "some-identity-resource-claim",
"Value": "Sam's Identity Resource Custom Claim",
"Type": "avatar",
"Value": "Test's Api Resource Custom Claim",
"ValueType": "string"
}
]
Expand All @@ -76,34 +64,16 @@ services:
CLIENTS_CONFIGURATION_INLINE: |
[
{
"ClientId": "implicit-mock-client",
"Description": "Client for implicit flow",
"AllowedGrantTypes": ["implicit"],
"ClientId": "authentik-mock-client",
"ClientSecrets": ["authentik-mock-client-secret"],
"Description": "Client for authentik credentials flow",
"AllowedGrantTypes": ["authorization_code"],
"RequirePkce": false,
"AllowAccessTokensViaBrowser": true,
"RedirectUris": ["http://localhost:3000/auth/oidc", "http://localhost:4004/auth/oidc"],
"AllowedScopes": ["openid", "profile", "email"],
"RedirectUris": ["https://xima-oauth2-extended.ddev.site/typo3/login?loginProvider=1616569531&oauth2-provider=authentik&login_status=login&commandLI=attempt"],
"AllowedScopes": ["openid", "profile", "email", "avatar"],
"IdentityTokenLifetime": 3600,
"AccessTokenLifetime": 3600
},
{
"ClientId": "client-credentials-mock-client",
"ClientSecrets": ["client-credentials-mock-client-secret"],
"Description": "Client for client credentials flow",
"AllowedGrantTypes": ["client_credentials"],
"AllowedScopes": ["some-app-scope-1"],
"ClientClaimsPrefix": "",
"Claims": [
{
"Type": "string_claim",
"Value": "string_claim_value",
"ValueType": "string"
},
{
"Type": "json_claim",
"Value": "[\"value1\", \"value2\"]",
"ValueType": "json"
}
]
"AccessTokenLifetime": 3600,
}
]
ASPNET_SERVICES_OPTIONS_INLINE: |
Expand All @@ -113,6 +83,9 @@ services:
}
}
VIRTUAL_HOST: $DDEV_HOSTNAME
HTTP_EXPOSE: 4011:8080
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: ${DDEV_APPROOT}

# go to http://xima-oauth2-extended.ddev.site:4011/

0 comments on commit e3d8a42

Please sign in to comment.