ProficientNowTechRFCs

11. GitOps Integration

RFC-PAM-0001                                                   Section 11
Category: Standards Track                            GitOps Integration

11. GitOps Integration

← Previous: Access Requests | Index | Next: Rationale →


11.1 Configuration in Git

11.1.1 GitOps Principles

PAM configuration follows GitOps principles established in RFC-IAM-0001 §7:

PrincipleApplication to PAM
Git as source of truthRole definitions stored in Git
Declarative configurationTeleport resources as YAML
Version controlAll changes tracked with history
Peer reviewChanges require PR approval
Automated syncArgoCD deploys configuration

11.1.2 Repository Structure

PAM configuration lives within the platform stack structure:

platform/
└── stacks/
    └── security/
        └── charts/
            ├── teleport/
            │   ├── Chart.yaml
            │   ├── values.yaml
            │   └── templates/
            │       ├── auth-service.yaml
            │       ├── proxy-service.yaml
            │       ├── oidc-connector.yaml
            │       ├── roles/
            │       │   ├── developer.yaml
            │       │   ├── sre-oncall.yaml
            │       │   ├── dba-oncall.yaml
            │       │   ├── data-analyst.yaml
            │       │   └── platform-admin.yaml
            │       └── external-secret.yaml

            ├── teleport-agents/
            │   ├── Chart.yaml
            │   ├── values.yaml
            │   └── templates/
            │       ├── ssh-agent-daemonset.yaml
            │       ├── db-agent-deployment.yaml
            │       └── kube-agent-deployment.yaml

            └── vault/
                └── templates/
                    ├── ssh-engine-config.yaml
                    └── db-engine-config.yaml

11.1.3 Configuration Categories

CategoryGitOps ManagedExample
Teleport cluster configYesAuth/proxy service settings
OIDC connectorYesKeycloak integration
Role definitionsYesWhat permissions exist
Agent deploymentsYesDaemonSets, Deployments
Vault engine configYesSSH CA, database connections
User-role assignmentsNoWho has what role
Active sessionsNoRuntime state
Access requestsNoRuntime state

11.2 Role Definitions

11.2.1 Role Structure

Teleport roles define access permissions:

ComponentPurpose
MetadataRole name, description
Allow rulesWhat this role permits
Deny rulesWhat this role explicitly blocks
OptionsSession settings, TTLs

11.2.2 Role Definition Example

A developer role definition (conceptual structure):

kind: role
metadata:
  name: developer
  description: Standard developer access to non-production resources
spec:
  allow:
    # SSH access
    node_labels:
      env: ['development', 'staging']
    logins: ['ubuntu', 'ec2-user']
 
    # Database access
    db_labels:
      env: ['development', 'staging']
    db_roles: ['readonly']
 
    # Kubernetes access
    kubernetes_labels:
      env: ['development', 'staging']
    kubernetes_groups: ['developers']
    kubernetes_resources:
      - kind: pod
        verbs: ['get', 'list']
      - kind: pod/exec
        verbs: ['create']
 
  deny:
    # Explicitly block production
    node_labels:
      env: ['production']
    db_labels:
      env: ['production']
 
  options:
    max_session_ttl: 8h
    forward_agent: false
    port_forwarding: true

11.2.3 Role Hierarchy

Roles are designed in a hierarchy:

Users start with base roles and request elevated roles through JIT.

11.2.4 Role Change Process

Role definition changes follow the standard GitOps workflow:

11.3 Policy Management

11.3.1 Access Policies

Access policies define JIT requirements:

Policy ComponentDescription
Requestable rolesWhich roles can be requested
Approval requirementsWho must approve
Max durationHow long access can last
Request reasonsRequired justification

11.3.2 Approval Policies

Approval policies are defined in Git:

RoleApproval PolicyMax Duration
sre-oncallapprovers: [oncall-sre, manager]8h
dba-oncallapprovers: [oncall-dba]4h
platform-adminapprovers: [security, manager], threshold: 22h

11.3.3 Session Policies

Session policies control behavior:

PolicySettingScope
Recording modestrict (fail if recording unavailable)All sessions
Idle timeout30 minutesAll sessions
Max concurrent sessions5Per user
Clipboard sharingDisabled for productionPer environment

11.4 ESO Secret Distribution

11.4.1 Teleport Secrets

Teleport requires secrets distributed via ESO:

SecretVault PathK8s SecretUsage
OIDC client secretsecret/platform/teleport/oidcteleport-oidc-clientKeycloak auth
License keysecret/platform/teleport/licenseteleport-licenseEnterprise features
CA private keyssh/config/cateleport-ssh-caSSH certificate signing
Join tokenssecret/platform/teleport/agentsteleport-join-tokenAgent enrollment

11.4.2 ExternalSecret Definitions

ExternalSecrets are defined in Helm templates:

apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: teleport-oidc-client
  namespace: teleport
spec:
  refreshInterval: 1h
  secretStoreRef:
    name: vault-backend
    kind: ClusterSecretStore
  target:
    name: teleport-oidc-client
  data:
    - secretKey: client-secret
      remoteRef:
        key: secret/platform/teleport/oidc
        property: client_secret

11.4.3 Agent Token Distribution

Agent join tokens follow the same pattern:

11.5 GitOps Boundary

11.5.1 Boundary Definition

Per INV-11 and INV-12, there is a clear boundary:

In GitOpsOutside GitOps
Role definitionsUser-role assignments
Approval policiesActual approvals
Session policiesActive sessions
Agent configurationsRuntime enrollment
Vault engine setupDynamic credentials

11.5.2 Rationale for Boundary

Why roles in Git:

  • Infrequent changes
  • Benefit from peer review
  • Need audit trail
  • Reproducibility important

Why assignments not in Git:

  • Frequent changes (JIT)
  • Operational flexibility needed
  • Real-time response required
  • User data in Git is problematic

11.5.3 Administrative Interface

User-role assignments are managed through:

InterfaceUse Case
Teleport Web UIVisual role assignment
tctl CLIScripted management
Access Request APIJIT workflow integration
SCIM (future)Identity provider sync

11.5.4 Reconciliation

GitOps reconciles role definitions but not assignments:

ResourceReconciliation
Role YAMLArgoCD ensures role exists as defined
User assignmentPreserved across syncs
Active sessionsNot affected by sync

Document Navigation


End of Section 11