Example Workflows
This section illustrates how the different Nauthera CRDs work together in common scenarios.
Onboarding a New Application
This workflow shows how a developer can onboard a new application and get OIDC credentials without needing to interact directly with the security team.
Personas:
- Developer: Member of the
my-app-devteam. - Security Admin: Manages security policies for the organization.
- Platform Admin: Manages the Nauthera platform.
Prerequisites:
- The Platform Admin has already deployed an
AuthServernamedproduction-server. - The Security Admin has already created an
AuthPolicynamedweb-apps-policythat governs web applications.
Developer Defines the AuthClient
The developer creates a simple AuthClient manifest for their new web application. They only need to specify the details relevant to their app.
# my-app/client.yaml
apiVersion: auth.nauthera.io/v1alpha1
kind: AuthClient
metadata:
name: my-webapp
namespace: my-app-dev
spec:
displayName: "My Awesome Web App"
authServerRef:
name: production-server
namespace: security
redirectUris:
- "https://my-webapp.dev.example.com/callback"
scopes:
- openid
- profile
- emailDeveloper Commits to Git
The developer commits this file to their application’s Git repository.
git add my-app/client.yaml
git commit -m "feat: add OIDC client for my-webapp"
git pushGitOps Controller Applies the Manifest
A GitOps controller (like Argo CD or Flux) detects the change and applies the AuthClient manifest to the Kubernetes cluster.
Nauthera Operator Takes Over
- The Nauthera operator sees the new
AuthClientresource. - It retrieves the referenced
AuthServer(production-server) and its associatedAuthPolicy(web-apps-policy). - It validates the
AuthClientagainst theAuthPolicy. - It provisions the new OIDC client in the backend authentication server.
- It creates a Kubernetes
Secretwith the client credentials. - It updates the
AuthClient’s status toReady.
Application Consumes the Secret
The application’s Deployment can now mount the generated secret and start the OIDC flow.
Updating a Security Policy
This workflow shows how a security admin can update a security policy and have it automatically enforced for all associated clients.
Security Admin Updates the AuthPolicy
The security team decides to shorten the access token lifetime for all web apps from 15 minutes to 5 minutes. The admin updates the AuthPolicy manifest.
# security-policies/web-apps-policy.yaml
apiVersion: auth.nauthera.io/v1alpha1
kind: AuthPolicy
metadata:
name: web-apps-policy
namespace: security
spec:
token:
# Changed from "15m"
accessTokenTTL: "5m"
refreshTokenTTL: "24h"
idTokenTTL: "5m"
# ... other fields remain the sameSecurity Admin Commits to Git
The admin commits the change to the security policies repository.
git add security-policies/web-apps-policy.yaml
git commit -m "sec: reduce access token lifetime for web apps"
git pushGitOps Controller Applies the Manifest
The GitOps controller applies the updated AuthPolicy.
Nauthera Operator Reconciles Clients
- The operator detects the change to the
AuthPolicy. - It identifies all
AuthClientresources that are governed by this policy. - It re-reconciles each of these clients, updating their configuration to reflect the new token lifetime.
The change is rolled out automatically and consistently, without any action required from the development teams.