You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integration with external systems is made possible through a set of plugable external providers. The following providers are currently supported:
45
45
46
+
*[GitHub](https://github.com)
46
47
*[Keycloak](https://www.keycloak.org/)/[Red Hat Single Sign On](https://access.redhat.com/products/red-hat-single-sign-on)
47
48
48
-
The following sections describe the configuration options provided by each provider
49
+
The following sections describe the configuration options available for each provider
50
+
51
+
52
+
### GitHub
53
+
54
+
Teams stored within a GitHub organization can be synchronized into OpenShift. The following table describes the set of configuration options for the GitHub provider:
55
+
56
+
| Name | Description | Defaults | Required |
57
+
| ----- | ---------- | -------- | ----- |
58
+
|`caSecretRef`| Reference to a secret containing a SSL certificate to use for communication (See below) || No |
59
+
|`credentialsSecretName`| Name of the secret containing authentication details (See below) || Yes |
60
+
|`insecure`| Ignore SSL verification | 'false' | No |
61
+
|`organization`| Organization to synchronize against || Yes |
62
+
|`teams`| List of teams to filter against || No |
63
+
|`url`| Base URL for the GitHub or GitHub Enterprise host (Must contain a trailing slash) || No |
64
+
65
+
66
+
The following is an example of a minimal configuration that can be applied to integrate with a Github provider:
67
+
68
+
```shell
69
+
apiVersion: redhatcop.redhat.io/v1alpha1
70
+
kind: GroupSync
71
+
metadata:
72
+
name: github-groupsync
73
+
namespace: group-sync-operator
74
+
spec:
75
+
providers:
76
+
- github:
77
+
organization: ocp
78
+
credentialsSecretName: github-group-sync
79
+
```
80
+
81
+
#### Authenticating to GitHub
82
+
83
+
Authentication to GitHub can be performed using an OAuth Personal Access Token or a Username and Password (Note: 2FA not supported). A secret must be created in the same namespace that contains the `GroupSync` resource:
84
+
85
+
When using an OAuth token, the following key is required:
86
+
87
+
*`token` - OAuth token
88
+
89
+
The secret can be created by executing the following command:
Groups stored within Keycloak can be synchronized into OpenShift. The following table describes the set of configuration options for the Keycloak provider:
53
110
54
111
| Name | Description | Defaults | Required |
55
112
| ----- | ---------- | -------- | ----- |
56
-
|`url`| URL Location for Keycloak || Yes |
113
+
|`caSecretRef`| Reference to a secret containing a SSL certificate to use for communication (See below) || No |
114
+
|`credentialsSecretName`| Name of the secret containing authentication details (See below) || Yes |
115
+
|`groups`| List of groups to filter against || No |
116
+
|`insecure`| Ignore SSL verification | 'false' | No |
57
117
|`loginRealm`| Realm to authenticate against |`master`| No |
58
118
|`realm`| Realm to synchronize || Yes |
59
-
|`secretName`| Name of the secret containing authentication details (See below) || Yes |
60
-
|`insecure`| Ignore SSL verification | 'false' | No |
61
119
|`scope`| Scope for group synchronization. Options are `one` for one level or `sub` to include subgroups |`sub`| No |
120
+
|`url`| URL Location for Keycloak || Yes |
121
+
62
122
63
123
The following is an example of a minimal configuration that can be applied to integrate with a Keycloak provider:
@@ -83,12 +143,47 @@ A secret must be created in the same namespace that contains the `GroupSync` res
83
143
*`username` - Username for authenticating with Keycloak
84
144
*`password` - Password for authenticating with Keycloak
85
145
86
-
To specify the TLS certificates that should be used to communicate with Keycloak, add the certificates to `ca.crt` key
146
+
## CA Certificates
147
+
148
+
Each provider allows for certificates to be provided in a secret to communicate to the target host. The secret must be placed in the same namespace as the `GroupSync`. An example of how a CA certificate for the Keycloak provider can be found below:
87
149
88
-
## Sync Period
89
150
90
-
To specify the period for which synchronization should occur on a regular basis, the `syncPeriodMinutes` field can be set as described below
A cron style expression can be specified for which a synchronization event will occur. The following specifies that a synchronization should occur nightly at 3AM
172
+
173
+
174
+
```shell
175
+
apiVersion: redhatcop.redhat.io/v1alpha1
176
+
kind: GroupSync
177
+
metadata:
178
+
name: keycloak-groupsync
179
+
namespace: group-sync-operator
180
+
spec:
181
+
schedule: "0 3 * * *"
182
+
providers:
183
+
- ...
184
+
```
91
185
186
+
If a schedule is not provided, synchronization will occur only when the object is reconciled by the platform.
92
187
93
188
94
189
## Local Development
@@ -110,3 +205,4 @@ Using the [operator-sdk](https://github.com/operator-framework/operator-sdk), ru
0 commit comments