# Elevated role granted through just-in-time access requests.
# Holders get SSH and database admin on production hosts and databases,
# but only for the duration of an approved request.
apiVersion: almaforge.com/v1
kind: Role
metadata:
  name: dba
spec:
  options:
    maxSessionTTL: 2h # cap the elevated certificate at 2 hours
  allow:
    serverLogins: ['dba'] # Linux account used on SSH targets
    serverLabels:
      role: ['database'] # restrict to hosts labeled role=database
    databaseLabels:
      env: ['prod'] # restrict to production databases
    databaseUsers: ['*'] # any database user can be assumed
    databaseNames: ['*'] # any database name can be opened
