Skip to content

Agent Mesh

examples: give the Keycloak example's tokens two minutes

HosniBelfeki92ec3737aba7
diff --git a/development/examples/keycloak-idp/realm-elsewhere.json b/development/examples/keycloak-idp/realm-elsewhere.json
index 8eb68ce2..acef26a1 100644
--- a/development/examples/keycloak-idp/realm-elsewhere.json
+++ b/development/examples/keycloak-idp/realm-elsewhere.json
@@ -1,7 +1,7 @@
{
"realm": "elsewhere",
"enabled": true,
- "accessTokenLifespan": 60,
+ "accessTokenLifespan": 120,
"clients": [
{
"clientId": "agentmesh",
diff --git a/development/examples/keycloak-idp/realm-mesh.json b/development/examples/keycloak-idp/realm-mesh.json
index 9ef093ec..bf9390b6 100644
--- a/development/examples/keycloak-idp/realm-mesh.json
+++ b/development/examples/keycloak-idp/realm-mesh.json
@@ -1,7 +1,7 @@
{
"realm": "mesh",
"enabled": true,
- "accessTokenLifespan": 60,
+ "accessTokenLifespan": 120,
"groups": [{ "name": "devs" }, { "name": "ops" }],
"clients": [
{
diff --git a/development/examples/keycloak-idp/run.sh b/development/examples/keycloak-idp/run.sh
index a7215bad..dfab3a33 100755
--- a/development/examples/keycloak-idp/run.sh
+++ b/development/examples/keycloak-idp/run.sh
@@ -210,9 +210,9 @@ expect "bob, new token (grant added)" 200 "$(call_calc bob.agentmesh.mesh.header
expect "alice, new token (grant removed)" 403 "$(call_calc alice.agentmesh.mesh.header)"
expect "alice, token exchanged before the change, not yet expired" 200 "$(call_calc alice-before.header)"
-wait_for=$((issued_at + 65 - $(date +%s)))
+wait_for=$((issued_at + 125 - $(date +%s)))
if ((wait_for > 0)); then
- echo " waiting ${wait_for}s for that token to pass its exp (60s lifetime in this realm)"
+ echo " waiting ${wait_for}s for that token to pass its exp (120s lifetime in this realm)"
sleep "${wait_for}"
fi
expect "alice, the same token after its exp" 403 "$(call_calc alice-before.header)"