-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Give the registry permission to read namespace secrets - Update the registry helm chart to grant the service account permission to read secrets in the current namespace - Specify that infra should not run in the default namespace in the docs - Change name of example secrets - Add a registry service account
- Loading branch information
Showing
7 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,8 +41,8 @@ sources: | |
- type: okta | ||
domain: acme.okta.com | ||
clientId: 0oapn0qwiQPiMIyR35d6 | ||
clientSecret: jfpn0qwiQPiMIfs408fjs048fjpn0qwiQPiMajsdf08j10j2 | ||
apiToken: 001XJv9xhv899sdfns938haos3h8oahsdaohd2o8hdao82hd | ||
clientSecret: infra-registry-okta/clientSecret | ||
apiToken: infra-registry-okta/apiToken | ||
|
||
users: | ||
- name: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ sources: | |
- type: okta | ||
domain: acme.okta.com | ||
clientId: 0oapn0qwiQPiMIyR35d6 | ||
clientSecret: infra-okta/clientSecret | ||
apiToken: infra-okta/apiToken | ||
clientSecret: infra-registry-okta/clientSecret | ||
apiToken: infra-registry-okta/apiToken | ||
``` | ||
|
||
## Contents | ||
|
@@ -54,11 +54,12 @@ The Okta client secret and API token are sensitive information which cannot be s | |
Create [Kubernetes Secret objects](https://kubernetes.io/docs/tasks/configmap-secret/) to store the Okta client secret and API token (noted in steps 4 and 5 of `Create an Okta App` respectively). You can name these Secrets as you desire, these names will be specified in the Infra configuration. | ||
|
||
#### Example Secret Creation | ||
Store the Okta client secret and API token on the same Kubernetes Secret object. | ||
Store the Okta client secret and API token on the same Kubernetes Secret object in the namespace that Infra registry is running in. | ||
``` | ||
kubectl create secret generic infra-okta / | ||
--from-literal=clientSecret=jfpn0qwiQPiMIfs408fjs048fjpn0qwiQPiMajsdf08j10j2 / | ||
--from-literal=apiToken=001XJv9xhv899sdfns938haos3h8oahsdaohd2o8hdao82hd / | ||
kubectl create secret generic infra-registry-okta \ | ||
--namespace=infrahq \ | ||
--from-literal=clientSecret=jfpn0qwiQPiMIfs408fjs048fjpn0qwiQPiMajsdf08j10j2 \ | ||
--from-literal=apiToken=001XJv9xhv899sdfns938haos3h8oahsdaohd2o8hdao82hd | ||
``` | ||
|
||
### Add Okta information to Infra registry | ||
|
@@ -70,8 +71,8 @@ sources: | |
- type: okta | ||
domain: acme.okta.com | ||
clientId: 0oapn0qwiQPiMIyR35d6 | ||
clientSecret: infra-okta/clientSecret # <kubernetes secret object name>/<key of the secret> | ||
apiToken: infra-okta/apiToken | ||
clientSecret: infra-registry-okta/clientSecret # <kubernetes secret object name>/<key of the secret> | ||
apiToken: infra-registry-okta/apiToken | ||
|
||
users: | ||
- name: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: infra-registry-secret-reader | ||
namespace: {{ .Release.Namespace }} | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
verbs: ["get"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: infra-registry-secret-reader | ||
namespace: {{ .Release.Namespace }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: infra-registry | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: infra-registry-secret-reader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: infra-registry | ||
namespace: {{ .Release.Namespace }} |