@startuml "pinniped" !define K8S_BLUE #326CE5 !define K8S_SPRITES_URL https://raw.githubusercontent.com/michiel/plantuml-kubernetes-sprites/master/resource !include K8S_SPRITES_URL/k8s-sprites-unlabeled-25pct.iuml participant "User" as USER << ($pod{scale=0.30},K8S_BLUE) >> #LightGreen participant "Kubectl" as KUBECTL << ($ing{scale=0.30},K8S_BLUE) >> #LightSteelBlue participant "Proprietary CLI" as CLI << ($svc{scale=0.30},K8S_BLUE) >> #LightPink participant "Pinniped" as PINNIPED << ($node{scale=0.30},K8S_BLUE) >> #LightGray participant "TokenReview Webhook" as WEBHOOK << ($pod{scale=0.30},K8S_BLUE) >> #LightPink participant "Kubernetes API" as API << ($node{scale=0.30},K8S_BLUE) >> #LightSteelBlue legend # Message contains upstream IDP credentials # Message contains cluster-specific credentials end legend USER -> KUBECTL : ""kubectl get pods"" activate KUBECTL group Acquire cluster-specific credential KUBECTL -> CLI : Get cluster-specific credential activate CLI CLI -> CLI : Retrieve upstream IDP credential in\norganization-specific way CLI -> PINNIPED : ""POST /apis/pinniped.dev/..."" activate PINNIPED PINNIPED -> WEBHOOK : ""POST /authenticate"" activate WEBHOOK WEBHOOK -> PINNIPED : ""200 OK"" with user and group information deactivate WEBHOOK PINNIPED -> PINNIPED : Issue short-lived cluster-specific credential\nwith user and group information PINNIPED -> CLI : ""200 OK"" deactivate PINNIPED CLI -> KUBECTL : Here is a cluster-specific credential end group Authenticate to cluster with cluster-specific credential KUBECTL -> API : ""GET /api/v1/pods"" activate API API -> API : Glean user and group information from\ncluster-specific credential API -> KUBECTL : ""200 OK"" with pods deactivate API deactivate KUBECTL end @enduml