Authenticate production Guidewire Cloud API integrations and survive the auth-side failures — token expiry storms, scope drift, private-CA PKIX errors, secret rotation.
SkillScore73Maintained
Automatic
◆DevOps & SRE packguidewireoauth2authentication
Last verified 8/30/2026
What it changes
Passed 16 of 22 test cases with the skill, and 7 of 22 without it.
Without skill32%
With skill73%
Checks it passed that the model alone missed
Executes scope verification on every token refresh.
Uses the JWT exp claim timestamp for TTL calculation.
Decrypts secrets using sops -d on secrets.prod.sops.yaml.
and 11 more in the full report
10 fixed6 passed either way5 still failing1 broke
Pass-rate lift
+41 pp
Tokens
+96%
Agent turns
0%
Response time
-8%
Model gemini-3.6-flashMeasured 8/30/2026v116 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 10 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 10
Prompt
We are building a Node.js integration microservice that talks to Guidewire Cloud APIs using client credentials. Can you provide a TypeScript module for token management? It needs to fetch tokens via OAuth2, cache them in memory, prevent duplicate simultaneous refresh calls when under heavy traffic, and verify that the issued access token contains all required permissions on every refresh.
What was checked, without and with the skill
Checked
Without skill
With skill
Decodes the JWT access token to derive expiration from the exp claim rather than using expires_in.
Missed
Passed
Calculates proactive token refresh timing at 80% of remaining TTL.
Missed
Passed
Serializes concurrent token requests using an in-flight promise variable.
Passed
Passed
Validates missing required scopes against the decoded scope claim during refresh.
Passed
Passed
case-01 · gemini-3.6-flash · 8/30/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md188 lines3 files
Guidewire Install & Auth
Overview
Authenticate a backend service to a Guidewire Cloud tenant using OAuth2 client credentials and operate the auth layer in production. This is not a hello-world walkthrough; it is the auth code your service runs at 3am when a token expires mid-batch, when a tenant admin rotates a scope, when a private CA renews a cert, and when on-call needs to swap a leaked secret without dropping in-flight requests.
The four production failures this skill prevents:
Token expiry storms — every request races to refresh, the Hub rate-limits the auth endpoint, the integration cascades to red.
Scope drift — a GCC admin removes a scope, every cached token starts returning 403, retrying does not help.
PKIX path building failed — JVM cannot validate the tenant's TLS chain because the private CA is not in the trust store; common when carriers front Cloud API with their own DLP appliance.
Secret rotation downtime — the active client secret is rotated and the old secret stops working before the new one is loaded; in-flight token refreshes fail until restart.
Prerequisites
JDK 17 (Guidewire Cloud release 202503 and later)
A registered Service Application in Guidewire Cloud Console (GCC) with Cloud API roles assigned per least privilege
Network egress from your runtime to *.guidewire.net (runtime APIs) and gcc.guidewire.com (console only)
A secret store the runtime can read at startup and on rotation signal (AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault, or Kubernetes Secret with CSI driver)
For private-CA tenants: the carrier's CA chain in PEM form
Instructions
Build the auth layer in this order. Each section solves one production failure mode; do not skip steps because the failure shows up in production, not in dev.
Wire secret rotation to your secret store; do not commit secrets or bake them into images.
For private-CA tenants, install the trust store at the JVM/init-container layer.
Validate scope hardening on every refresh so drift fails fast, not on the next business call.
Token-cache pattern (production)
Tokens are short-lived, typically one hour. Reactive refresh on 401 is wrong: it doubles latency on the failing request and creates a thundering herd when many requests notice expiry simultaneously. Cache the token in-process and refresh proactively at 80% of TTL, behind a single-flight gate so concurrent refreshers serialize.
import jwt from "jsonwebtoken";
type Cached = { value: string; expiresAt: number };
let cached: Cached | null = null;
let inflight: Promise<string> | null = null;
Operate a Guidewire Cloud API integration in production — define SLIs/SLOs for token availability, bind success rate, FNOL p99 latency; route alerts so the on-call gets paged for real outages and never for transient noise; triage 401 spikes, 409 storms, 429 saturation, scope drift, and Gosu OOM cascades from signal to recovery in 15 minutes or less. Use when designing a dashboard for a new integration, writing the on-call runbook, or running a post-incident review. Trigger with "guidewire observ