infisical: repoint secret CRs at the rebuilt machine identity
Also tracks the auth ServiceAccounts and RBAC in Git so a namespace rebuild restores Kubernetes auth on its own.
This commit is contained in:
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -8,7 +8,7 @@ spec:
|
||||
resyncInterval: 30
|
||||
authentication:
|
||||
kubernetesAuth:
|
||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
||||
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||
serviceAccountRef:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# Kubernetes-native auth for the InfisicalSecret operator.
|
||||
# infisical-auth: the identity the CRDs mint short-lived tokens for.
|
||||
# infisical-token-reviewer: its JWT is pasted into Infisical's Kubernetes Auth
|
||||
# config so Infisical can call TokenReview. Bound to system:auth-delegator below.
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: infisical-auth
|
||||
namespace: infisical
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: infisical-token-reviewer
|
||||
namespace: infisical
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: infisical-token-reviewer
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: system:auth-delegator
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: infisical-token-reviewer
|
||||
namespace: infisical
|
||||
---
|
||||
# The operator needs to mint tokens for infisical-auth; without this it falls
|
||||
# back to the legacy SA .secrets[] lookup and never gets a token.
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: infisical-operator-token-creator
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["serviceaccounts/token"]
|
||||
verbs: ["create"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: infisical-operator-token-creator
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: infisical-operator-token-creator
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: infisical-opera-controller-manager
|
||||
namespace: infisical-operator
|
||||
---
|
||||
# Long-lived token for the reviewer SA. `kubectl create token` expires; the
|
||||
# value pasted into Infisical's Kubernetes Auth config must not.
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: infisical-token-reviewer
|
||||
namespace: infisical
|
||||
annotations:
|
||||
kubernetes.io/service-account.name: infisical-token-reviewer
|
||||
type: kubernetes.io/service-account-token
|
||||
Reference in New Issue
Block a user