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
Copy file name to clipboardExpand all lines: install-and-configure/advanced-configuration/user-management-saml/README.md
+35-27Lines changed: 35 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,15 @@ Kubecost supports single sign-on (SSO) and role-based access control (RBAC) with
8
8
9
9
## Overview of features
10
10
11
-
* User authentication (`.Values.saml`): SSO provides a simple mechanism to restrict application access internally and externally
12
-
* Pre-defined user roles (`.Values.saml.rbac`):
13
-
*`admin`: Full control with permissions to manage users, configure model inputs, and application settings.
14
-
*`readonly`: User role with read-only permission.
15
-
*`editor`: Role can change and build alerts and reports, but cannot edit application settings and otherwise functions as read-only.
16
-
* Custom access roles (_filters.json_): Limit users based on attributes or group membership to view a set of namespaces, clusters, or other aggregations
11
+
- User authentication (`.Values.saml`): SSO provides a simple mechanism to restrict application access internally and externally
12
+
- Pre-defined user roles (`.Values.saml.rbac`):
13
+
-`admin`: Full control with permissions to manage users, configure model inputs, and application settings.
14
+
-`readonly`: User role with read-only permission.
15
+
-`editor`: Role can change and build alerts and reports, but cannot edit application settings and otherwise functions as read-only.
16
+
- Custom access roles (_filters.json_): Limit users based on attributes or group membership to view a set of namespaces, clusters, or other aggregations
17
17
18
18
{% code overflow="wrap" %}
19
+
19
20
```yaml
20
21
# EXAMPLE CONFIGURATION
21
22
# View setup guides below, for full list of Helm configuration values
@@ -38,18 +39,19 @@ saml:
38
39
- "kubecost_superusers"
39
40
- name: readonly
40
41
enabled: true
41
-
assertionName: "kubecost_group"
42
+
assertionName: "kubecost_group"
42
43
assertionvalues:
43
44
- "kubecost_users"
44
45
customGroups:
45
46
- assertionName: "kubecost_group"
46
47
```
48
+
47
49
{% endcode %}
48
50
49
51
## SAML setup guides
50
52
51
-
* [Microsoft Entra ID (formerly Azure AD) SAML Integration for Kubecost](microsoft-entra-id-saml-integration-for-kubecost.md)
52
-
* [Okta setup guide](okta-saml-integration.md)
53
+
- [Microsoft Entra ID (formerly Azure AD) SAML Integration for Kubecost](microsoft-entra-id-saml-integration-for-kubecost.md)
54
+
- [Okta setup guide](okta-saml-integration.md)
53
55
54
56
{% hint style="info" %}
55
57
All SAML 2.0 providers also work. The above guides can be used as templates for what is required.
@@ -59,25 +61,29 @@ All SAML 2.0 providers also work. The above guides can be used as templates for
59
61
60
62
When SAML SSO is enabled in Kubecost, the following ports will require authentication:
61
63
62
-
*`service/kubecost-cost-analyzer`: ports 9003 and 9090
63
-
* `service/kubecost-aggregator`: port 9004
64
+
-`service/kubecost-cost-analyzer`: ports 9003 and 9090
1. Disable SAML and confirm the `cost-analyzer` pod starts. If `kubecostAggregator.enabled` is unspecified or `true` in the _values.yaml_ file, confirm that the `aggregator` pod starts.
103
-
2. If Step 1 is successful, but the pod is crashing or never enters the ready state when SAML is added, it is likely there is panic when loading or parsing SAML data.
104
-
* If `kubecostAggregator.enabled` is `true` or unspecified in _values.yaml_, run `kubectl logs statefulsets/kubecost-aggregator` and `kubectl logs deploy/kubecost-cost-analyzer`
105
-
* If `kubecostAggregator.enabled` is `false` in _values.yaml_, run `kubectl logs services/kubecost-aggregator` and `kubectl logs deploy/kubecost-cost-analyzer`
108
+
1. Disable SAML and verify that the `cost-analyzer` pod starts successfully. If the `aggregator` pod is enabled, verify it also starts successfully.
109
+
2. If Step 1 is successful but re-enabling SAML causes the pod to crash or never enter the ready state, it is likely there is panic when parsing SAML data. Run `kubectl logs services/kubecost-aggregator` for further details.
106
110
107
-
If you’re supplying the SAML from the address of an Identity Provider Server, `curl` the SAML metadata endpoint from within the `kubecost` pod and ensure that a valid XML EntityDescriptor is being returned and downloaded. The response should be in this format:
111
+
If you have specified a `.Values.saml.idpMetadataURL`, try running `curl` from within the `kubecost` pod and ensure that a valid XML EntityDescriptor is being returned and downloaded. The response should be in the format shown below. Kubecost expects both `entityID` and `IDPSSODescriptor.SingleSignOnService.Location` to exist in the response.
@@ -147,19 +153,21 @@ Contact your SAML admin to find the URL on your identity provider that serves th
147
153
148
154
Certain metadata URLs could potentially return an EntitiesDescriptor, instead of an EntityDescriptor. While Kubecost does not currently support using an EntitiesDescriptor, you can instead copy the EntityDescriptor into a new file you create called metadata.xml:
149
155
150
-
* Download the XML from the metadata URL into a file called _metadata.xml_
151
-
* Copy all the attributes from `EntitiesDescriptor` to the `EntityDescriptor` that are not present.
152
-
* Remove the `<EntitiesDescriptor>` tag from the beginning.
153
-
* Remove the `</EntitiesDescriptor>` from the end of the XML file.
156
+
-Download the XML from the metadata URL into a file called _metadata.xml_
157
+
-Copy all the attributes from `EntitiesDescriptor` to the `EntityDescriptor` that are not present.
158
+
-Remove the `<EntitiesDescriptor>` tag from the beginning.
159
+
-Remove the `</EntitiesDescriptor>` from the end of the XML file.
154
160
155
161
You are left with data in a similar format to the example below:
Then, you can upload the EntityDescriptor to a secret in the same namespace as kubecost and use that directly.
@@ -170,13 +178,13 @@ To use this secret, in your helm values set metadataSecretName to the name of th
170
178
171
179
```yaml
172
180
saml:
173
-
metadataSecretName: “metadata-secret”
174
-
idpMetadataURL: “”
181
+
metadataSecretName: "metadata-secret"
182
+
idpMetadataURL: ""
175
183
```
176
184
177
185
**Invalid NameID format**
178
186
179
-
On Keycloak, if you receive an “Invalid NameID format” error, you should set the option “force nameid format” in Keycloak. See [Keycloak docs](https://www.keycloak.org/documentation) for more details.
187
+
On Keycloak, if you receive an "Invalid NameID format" error, you should set the option "force nameid format" in Keycloak. See [Keycloak docs](https://www.keycloak.org/documentation) for more details.
180
188
181
189
**Users of CSI driver for storing SAML secret**
182
190
@@ -186,15 +194,15 @@ For users who want to use CSI driver for storing SAML secret, we suggest this [g
186
194
187
195
From a [PingIdentity article](https://support.pingidentity.com/s/article/Cannot-provide-requested-name-identifier-qualified-with-SampleNameNEW):
188
196
189
-
> An alternative solution is to add an attribute called "SAML\_SP\_NAME\_QUALIFIER" to the connection's attribute contract with a TEXT value of the requested SPNameQualifier. When you do this, select the following for attribute name format: `urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`
197
+
> An alternative solution is to add an attribute called `SAML_SP_NAME_QUALIFIER` to the connection's attribute contract with a TEXT value of the requested SPNameQualifier. When you do this, select the following for attribute name format: `urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`
190
198
191
-
On the PingID side: specify an attribute contract “SAML\_SP\_NAME\_QUALIFIER” with the format `urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`.
199
+
On the PingID side: specify an attribute contract `SAML_SP_NAME_QUALIFIER` with the format `urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified`.
192
200
193
201
On the Kubecost side: in your Helm values, set `saml.nameIDFormat` to the same format set by PingID:
0 commit comments