-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> Co-authored-by: Allan Roger Reid <allanrogerreid@gmail.com>
- Loading branch information
1 parent
14fed14
commit 109d08f
Showing
108 changed files
with
5,045 additions
and
127 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
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
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,51 @@ | ||
# MinIO Operator STS | ||
|
||
**Native IAM Authentication for Kubernetes.** | ||
|
||
> ⚠️ This feature is an alpha release and is subject to breaking changes in future releases. | ||
MinIO Operator offers support | ||
for [Secure Tokens](https://min.io/docs/minio/linux/developers/security-token-service.html?ref=op-gh) (a.k.a. STS) which | ||
are a | ||
form of temporary access credentials for your | ||
MinIO Tenant. In essence, this allows you to control access to your MinIO tenant from your applications without having to | ||
explicitly create credentials for each application; in fact no credentials need to be created at all. | ||
|
||
# Authorization Flow | ||
|
||
For an application to gain access into a MinIO Tenant, a `PolicyBinding` granting explicit access to the application's | ||
[Service Account](https://kubernetes.io/docs/concepts/security/service-accounts/). Authorization is then validated | ||
using the following steps: | ||
|
||
1. AssumeRoleWithWebIdentity call | ||
2. Verify ServiceAccount JWT | ||
3. JWT Validation Result | ||
4. Validate SA has PolicyBinding in the Tenant namespace | ||
5. Get PolicyBinding | ||
6. AssumeRole for application | ||
7. Obtain Temporary Credentials | ||
8. Return Temporary Credentials To App | ||
9. Consume Object Storage | ||
|
||
![STS Diagram](images/sts-diagram.png) | ||
|
||
# Requirements | ||
|
||
## Enabling STS functionality | ||
|
||
At the moment, the STS feature ships `off` by default. To turn it on, switch `OPERATOR_STS_ENABLED` to `on` in | ||
the `minio-operator` deployment. | ||
|
||
## TLS | ||
|
||
The STS functionality works only with TLS configured. We can request certificates automatically, but additionally you can | ||
use `cert-manager` or bring your own certificates. | ||
|
||
## SDK support | ||
|
||
Your application must use an SDK that supports `AssumeRole` like behavior. | ||
|
||
# Examples | ||
|
||
We have provided example usage in the [examples/kustomization/sts-example](../examples/kustomization/sts-example) | ||
folder. |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,120 @@ | ||
// Generated documentation. Please do not edit. | ||
:anchor_prefix: k8s-api | ||
|
||
[id="{p}-api-reference"] | ||
== API Reference | ||
|
||
:minio-image: https://hub.docker.com/r/minio/minio/tags[minio/minio:RELEASE.2023-01-12T02-06-16Z] | ||
:kes-image: https://hub.docker.com/r/minio/kes/tags[minio/kes:v0.18.0] | ||
:prometheus-image: https://quay.io/prometheus/prometheus:latest[prometheus/prometheus:latest] | ||
:logsearch-image: https://hub.docker.com/r/minio/operator/tags[minio/operator:v4.5.8] | ||
:postgres-image: https://github.com/docker-library/postgres[library/postgres] | ||
|
||
|
||
[id="{anchor_prefix}-sts-min-io-v1alpha1"] | ||
=== sts.min.io/v1alpha1 | ||
|
||
Package v1alpha1 - The following parameters are specific to the `sts.min.io/v1alpha1` MinIO Policy Binding CRD API | ||
PolicyBinding is an Authorization mechanism managed by the Minio Operator. | ||
Using Kubernetes ServiceAccount JSON Web Tokens the binding allow a ServiceAccount to assume temporary IAM credentials. | ||
For more complete documentation on this object, see the https://docs.min.io/minio/k8s/reference/minio-operator-reference.html#minio-operator-yaml-reference[MinIO Kubernetes Documentation]. | ||
PolicyBinding is added as part of the MinIO Operator v5.0.0. + | ||
|
||
|
||
|
||
[id="{anchor_prefix}-github-com-minio-operator-pkg-apis-sts-min-io-v1alpha1-application"] | ||
==== Application | ||
|
||
Application defines the `Namespace` and `ServiceAccount` to authorize the usage of the policies listed | ||
|
||
.Appears In: | ||
**** | ||
- xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-sts-min-io-v1alpha1-policybindingspec[$$PolicyBindingSpec$$] | ||
**** | ||
|
||
[cols="25a,75a", options="header"] | ||
|=== | ||
| Field | Description | ||
|
||
|*`namespace`* __string__ | ||
|*Required* + | ||
|
||
|*`serviceaccount`* __string__ | ||
|*Required* + | ||
|
||
|=== | ||
|
||
|
||
[id="{anchor_prefix}-github-com-minio-operator-pkg-apis-sts-min-io-v1alpha1-policybinding"] | ||
==== PolicyBinding | ||
|
||
PolicyBinding is a https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/[Kubernetes object] describing a MinIO PolicyBinding. | ||
|
||
.Appears In: | ||
**** | ||
- xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-sts-min-io-v1alpha1-policybindinglist[$$PolicyBindingList$$] | ||
**** | ||
|
||
[cols="25a,75a", options="header"] | ||
|=== | ||
| Field | Description | ||
|
||
|*`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#objectmeta-v1-meta[$$ObjectMeta$$]__ | ||
|Refer to Kubernetes API documentation for fields of `metadata`. | ||
|
||
|
||
|*`spec`* __xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-sts-min-io-v1alpha1-policybindingspec[$$PolicyBindingSpec$$]__ | ||
|*Required* + | ||
The root field for the MinIO PolicyBinding object. | ||
|
||
|=== | ||
|
||
|
||
|
||
|
||
[id="{anchor_prefix}-github-com-minio-operator-pkg-apis-sts-min-io-v1alpha1-policybindingspec"] | ||
==== PolicyBindingSpec | ||
|
||
PolicyBindingSpec (`spec`) defines the configuration of a MinIO PolicyBinding object. + | ||
|
||
.Appears In: | ||
**** | ||
- xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-sts-min-io-v1alpha1-policybinding[$$PolicyBinding$$] | ||
**** | ||
|
||
[cols="25a,75a", options="header"] | ||
|=== | ||
| Field | Description | ||
|
||
|*`application`* __xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-sts-min-io-v1alpha1-application[$$Application$$]__ | ||
|*Required* + | ||
The Application Property identifies the namespace and service account that will be authorized | ||
|
||
|*`policies`* __string array__ | ||
|*Required* + | ||
|
||
|=== | ||
|
||
|
||
|
||
|
||
[id="{anchor_prefix}-github-com-minio-operator-pkg-apis-sts-min-io-v1alpha1-policybindingusage"] | ||
==== PolicyBindingUsage | ||
|
||
PolicyBindingUsage are metrics regarding the usage of the policyBinding | ||
|
||
.Appears In: | ||
**** | ||
- xref:{anchor_prefix}-github-com-minio-operator-pkg-apis-sts-min-io-v1alpha1-policybindingstatus[$$PolicyBindingStatus$$] | ||
**** | ||
|
||
[cols="25a,75a", options="header"] | ||
|=== | ||
| Field | Description | ||
|
||
|*`authotizations`* __integer__ | ||
| | ||
|
||
|=== | ||
|
||
|
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
Oops, something went wrong.