Skip to content

Commit 9b5b9ae

Browse files
authored
Update Keycloak realm and AppHost for OIDC silent redirect URIs (#52)
* Make toggle-local-library.sh executable * Document toggle-local-library.sh usage in README Add usage examples showing how to enable/disable/check status of local library debugging for EntityEvents. * Update Keycloak realm and UI resource templates for OIDC silent redirect URIs - Update crucible-realm.json redirect URIs to use .html extension - Update UI resource templates (*.ui.json) to generate correct OIDC settings - Ensures silent token renewal uses static HTML files instead of Angular routes --------- Co-authored-by: Adam Welle <arwelle@sei.cmu.edu>
1 parent fc314cd commit 9b5b9ae

File tree

9 files changed

+27
-11
lines changed

9 files changed

+27
-11
lines changed

Crucible.AppHost/resources/alloy.ui.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"response_type": "code",
99
"scope": "openid profile player player-vm alloy caster steamfitter",
1010
"automaticSilentRenew": true,
11-
"silent_redirect_uri": "http://localhost:4403/auth-callback-silent"
11+
"silent_redirect_uri": "http://localhost:4403/auth-callback-silent.html"
1212
}
1313
}

Crucible.AppHost/resources/blueprint.ui.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"response_type": "code",
99
"scope": "openid profile blueprint cite gallery player player-vm steamfitter",
1010
"automaticSilentRenew": true,
11-
"silent_redirect_uri": "http://localhost:4725/auth-callback-silent"
11+
"silent_redirect_uri": "http://localhost:4725/auth-callback-silent.html"
1212
},
1313
"AppTitle": "Blueprint",
1414
"AppTopBarHexColor": "#2d69b4",

Crucible.AppHost/resources/caster.ui.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"response_type": "code",
99
"scope": "openid profile email caster",
1010
"automaticSilentRenew": true,
11-
"silent_redirect_uri": "http://localhost:4310/auth-callback-silent/"
11+
"silent_redirect_uri": "http://localhost:4310/auth-callback-silent.html"
1212
}
1313
}

Crucible.AppHost/resources/cite.ui.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"response_type": "code",
99
"scope": "openid profile cite gallery",
1010
"automaticSilentRenew": true,
11-
"silent_redirect_uri": "http://localhost:4721/auth-callback-silent"
11+
"silent_redirect_uri": "http://localhost:4721/auth-callback-silent.html"
1212
},
1313
"AppTitle": "CITE",
1414
"AppTopBarHexColor": "#E81717",

Crucible.AppHost/resources/crucible-realm.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,7 +1472,7 @@
14721472
"alwaysDisplayInConsole": false,
14731473
"clientAuthenticatorType": "client-secret",
14741474
"redirectUris": [
1475-
"http://host.docker.internal:4303/auth-callback-silent",
1475+
"http://host.docker.internal:4303/auth-callback-silent.html",
14761476
"http://localhost:4303/auth-callback*",
14771477
"http://host.docker.internal:4303/auth-callback*"
14781478
],
@@ -2052,7 +2052,7 @@
20522052
"clientAuthenticatorType": "client-secret",
20532053
"redirectUris": [
20542054
"http://localhost:4725/auth-callback",
2055-
"http://localhost:4725/auth-callback-silent"
2055+
"http://localhost:4725/auth-callback-silent.html"
20562056
],
20572057
"webOrigins": ["http://localhost:4725"],
20582058
"notBefore": 0,
@@ -2245,7 +2245,7 @@
22452245
"clientAuthenticatorType": "client-secret",
22462246
"redirectUris": [
22472247
"http://localhost:4721/auth-callback",
2248-
"http://localhost:4721/auth-callback-silent"
2248+
"http://localhost:4721/auth-callback-silent.html"
22492249
],
22502250
"webOrigins": ["http://localhost:4721"],
22512251
"notBefore": 0,
@@ -2398,7 +2398,7 @@
23982398
"alwaysDisplayInConsole": false,
23992399
"clientAuthenticatorType": "client-secret",
24002400
"redirectUris": [
2401-
"http://localhost:4723/auth-callback-silent",
2401+
"http://localhost:4723/auth-callback-silent.html",
24022402
"http://localhost:4723/auth-callback"
24032403
],
24042404
"webOrigins": ["http://localhost:4723"],
@@ -2559,7 +2559,7 @@
25592559
"alwaysDisplayInConsole": false,
25602560
"clientAuthenticatorType": "client-secret",
25612561
"redirectUris": [
2562-
"http://localhost:4401/auth-callback-silent",
2562+
"http://localhost:4401/auth-callback-silent.html",
25632563
"http://localhost:4401/auth-callback"
25642564
],
25652565
"webOrigins": ["http://localhost:4401"],

Crucible.AppHost/resources/gallery.ui.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"response_type": "code",
99
"scope": "openid profile gallery steamfitter",
1010
"automaticSilentRenew": true,
11-
"silent_redirect_uri": "http://localhost:4723/auth-callback-silent"
11+
"silent_redirect_uri": "http://localhost:4723/auth-callback-silent.html"
1212
},
1313
"AppTitle": "Gallery",
1414
"AppTopBarHexColor": "#E81717",

Crucible.AppHost/resources/steamfitter.ui.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"response_type": "code",
99
"scope": "openid profile player player-vm steamfitter",
1010
"automaticSilentRenew": true,
11-
"silent_redirect_uri": "http://localhost:4401/auth-callback-silent"
11+
"silent_redirect_uri": "http://localhost:4401/auth-callback-silent.html"
1212
},
1313
"AppTitle": "Steamfitter",
1414
"AppTopBarHexColor": "#BB0000",

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,22 @@ This is the preferred method to enable display of debug messages inside of the b
617617

618618
The crucible-common-dotnet shared library is cloned into the `/mnt/data.crucible/libraries` directory. By default, APIs that use these libraries pull the published packages from NuGet. When developing or debugging these libraries, it is convenient to point the APIs to the local copy of the library. Developers can use the `scripts/toggle-local-library.sh` script to easily toggle between the default published NuGet packages and local Project References.
619619

620+
### Usage
621+
622+
```bash
623+
# Enable local library debugging (uses local EntityEvents source)
624+
./scripts/toggle-local-library.sh on
625+
626+
# Disable local library debugging (uses NuGet packages)
627+
./scripts/toggle-local-library.sh off
628+
629+
# Check current status
630+
./scripts/toggle-local-library.sh status
631+
632+
# Toggle current state
633+
./scripts/toggle-local-library.sh
634+
```
635+
620636
A Directory.Build.props file is mounted to `/mnt/data`. This file defines a variable `<UseLocalEntityEvents>false</UseLocalEntityEvents>`. If you want to use the local version of the Crucible.Common.EntityEvents library, copy this file to `/mnt/data/crucible` and set `<UseLocalEntityEvents>true</UseLocalEntityEvents>`. This will tell MSBuild to use a local project reference instead of the NuGet package and this file will not get checked into git. The script automates this process for you.
621637

622638
This pattern should be extended to the other libraries in crucible-common-dotnet as necessary in the future.

scripts/toggle-local-library.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)