google-agents-cli-scaffold
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
keycloak-expert
This skill should be used when the user asks to 'configure Keycloak', 'set up ABAC', 'create Keycloak realm', 'integrate Azure AD with Keycloak', 'implement authorization services', 'configure OIDC client', 'create Keycloak policies', 'set up UMA/RPT tokens', 'deploy Keycloak on OpenShift', 'inte...
Full skill instructions
Expert guidance for Keycloak identity and access management with deep focus on ABAC implementation.
ABAC moves authorization logic from application code to Keycloak's centralized policy engine.
Resources → What is protected (API endpoints, data, features)
Scopes → Actions on resources (view, edit, delete, admin)
Policies → Rules for access (role-based, time-based, JS-based, aggregate)
Permissions → Connect policies to resources/scopes
// Protected resource representing an API endpoint or feature
.createResource("user-profiles")
.withDisplayName("User Profile Data")
.withType("urn:app:resources:profile")
.withUris("/api/users/profile/*")
.withScopes("view", "edit", "delete")
.and()
$evaluation context.createPermission("admin-profile-management")
.onResource("user-profiles")
.withScopes("edit", "delete")
.withPolicies("admin-role-policy", "business-hours-policy")
.withDecisionStrategy(DecisionStrategy.UNANIMOUS)
.and()
Backend validates permissions by exchanging access token for RPT:
curl -X POST "${KEYCLOAK_URL}/realms/${REALM}/protocol/openid-connect/token" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-d "grant_type=urn:ietf:params:oauth:grant-type:uma-ticket" \
-d "audience=${CLIENT_ID}" \
-d "permission=${RESOURCE}#${SCOPE}"
Response Codes:
200 + access_token: Permission granted403: Permission denied by policy400: Invalid request or resourceFor detailed fluent builder patterns, see: references/fluent-builders.md
FluentRealmBuilder: Realm settings, token lifespans, securityFluentClientBuilder: OAuth clients, redirect URIs, flowsFluentRoleBuilder: Roles, composites, default rolesFluentAzureIdpBuilder: Azure AD federation with group mappingFluentAbacBuilder: Complete ABAC configuration// 1. Create realm
FluentRealmBuilder.create()
.with(keycloakClient)
.createRealm("toolbox")
.accessTokenLifespan(1200) // 20 min
.ssoSessionIdleTimeout(1800)
.bruteForceProtected(true)
.and().apply();
// 2. Configure roles
FluentRoleBuilder.forRealm("toolbox")
.with(keycloakClient)
.createRole("admin").withDescription("Administrator").and()
.createCompositeRole("default-roles-toolbox")
.addRealmRole("offline_access")
.addClientRole("account", "view-profile")
.and()
.setDefaultRole("default-roles-toolbox")
.apply();
// 3. Configure client with authorization
FluentClientBuilder.forRealm("toolbox")
.with(keycloakClient)
.createClient("toolbox-webui")
.confidentialClient()
.enableStandardFlow()
.enableServiceAccounts()
.enableAuthorizationServices()
.addRedirectUri("https://app.example.com/callback")
.and()
.apply();
// 4. Configure ABAC
FluentAbacBuilder.forClient("toolbox", "toolbox-webui")
.with(abacConfiguration)
.enableAuthorization(PolicyEnforcementMode.ENFORCING)
.createResource("mailtemplate")
.withType("urn:toolbox:resources:mailtemplate")
.withScopes("view")
.and()
.createPolicy("admin-policy")
.requireRoles("admin")
.and()
.createPermission("view-mailtemplate")
.onScopes("view")
.withPolicies("admin-policy")
.and()
.apply();
For complete integration examples, see: references/integrations.md
@AbacPolicy(resource = "mailtemplate", action = "view")
@GetMapping("/mail/templates")
public List<MailTemplate> getMailTemplates() {
return mailService.getAllTemplates();
}
The @AbacPolicy annotation triggers AOP-based policy evaluation via UMA:
// auth.config.ts
export const authOptions = {
providers: [
KeycloakProvider({
clientId: process.env.AUTH_KEYCLOAK_ID,
clientSecret: process.env.AUTH_KEYCLOAK_SECRET,
issuer: process.env.AUTH_KEYCLOAK_ISSUER,
}),
],
callbacks: {
jwt: async ({ token, account }) => {
if (account) {
token.accessToken = account.access_token;
token.refreshToken = account.refresh_token;
token.expiresAt = account.expires_at;
}
return token;
},
},
};
FluentAzureIdpBuilder.forRealm("toolbox")
.with(keycloakClient)
.configureAzureAD(clientId, clientSecret, tenantId)
.withAlias("azuread")
.withDisplayName("Azure AD")
.withDefaultScopes("openid", "profile", "email")
.trustEmails()
.and()
.createMapper("azure-admin-group-mapper")
.claimToRole()
.mapClaim("groups")
.withClaimValue(adminGroupId)
.toRole("admin")
.and()
.apply();
For detailed security guidance, see: references/security.md
Per OAuth 2.0 Security BCP, enable PKCE even for confidential clients:
.createClient("my-app")
.confidentialClient()
.enableStandardFlow()
.enablePKCE()
.withPkceMethod("S256")
.and()
KC_HTTP_MAX_QUEUED_REQUESTS)// Revoke refresh token
String revokeEndpoint = authServerUrl + "/realms/" + realm + "/protocol/openid-connect/revoke";
form.add("token", refreshToken);
form.add("token_type_hint", "refresh_token");
Enable metrics endpoint:
KC_METRICS_ENABLED=true
KC_HEALTH_ENABLED=true
Key alerts: login failures >10/min, token latency p99 >2s, error rate >1%
For OpenShift/Kubernetes specifics, see: references/deployment.md
apiVersion: k8s.keycloak.org/v2alpha1
kind: Keycloak
metadata:
name: keycloak
spec:
instances: 1
db:
vendor: mysql
host: mysql.mraas.svc.cluster.local
usernameSecret:
name: mysql-db-keycloak-secret
key: username
passwordSecret:
name: mysql-db-keycloak-secret
key: password
http:
httpEnabled: true
tlsSecret: keycloak-tls
proxy:
headers: xforwarded
hostname:
hostname: https://keycloak.example.com
admin: https://admin-keycloak.example.com
strict: false
image: custom-keycloak-image:tag
imagePullSecrets:
- name: registry-pull-secret
startOptimized: true
unsupported:
podTemplate:
spec:
containers:
- name: keycloak
env:
- name: CUSTOM_DB_URL
valueFrom:
secretKeyRef:
name: custom-db-secret
key: url
startOptimized: true for production (uses pre-built image)proxy.headers: xforwarded for reverse proxy behind ingresshostname.strict: false allows multiple hostnamesunsupported.podTemplate| Variable | Description |
|---|---|
KEYCLOAK_ADMIN | Admin username |
KEYCLOAK_ADMIN_PASSWORD | Admin password |
KC_DB | Database type (mysql, postgres) |
KC_DB_URL | JDBC connection string |
AZURE_CLIENT_ID | Azure AD app client ID |
AZURE_CLIENT_SECRET | Azure AD app secret |
AZURE_TENANT_ID | Azure AD tenant |
| Endpoint | Purpose |
|---|---|
/admin/realms/{realm} | Realm management |
/admin/realms/{realm}/clients | Client management |
/admin/realms/{realm}/clients/{id}/authz | Authorization services |
/realms/{realm}/protocol/openid-connect/token | Token endpoint |
/realms/{realm}/protocol/openid-connect/certs | JWKS endpoint |
| Strategy | Behavior |
|---|---|
UNANIMOUS | All policies must permit |
AFFIRMATIVE | At least one policy must permit |
CONSENSUS | Majority of policies must permit |
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.
Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.
Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.
Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.
Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.
Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.
Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Opus.ai: Revolutionize Your Web Experience
Build a no-code AI app in minutes.
An IDE for code migration from legacy to modern frameworks through coding agents.
Automate CGI animation in live-action scenes
Branded artistic QR-code concepts
Launch a website in seconds with AI.
Streamline Your Coding Experience with AI Code Helper
Convert any screenshot or design to clean code.