-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add User resource docs #773
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
f9edf97
First draft
JakeSCahill 8f74412
Merge branch 'main' of https://github.com/redpanda-data/docs into fix…
JakeSCahill d27912c
First draft
JakeSCahill 8aa1a58
Add examples
JakeSCahill 529c0b9
Fix tag
JakeSCahill ee58592
Fix tag
JakeSCahill 064e0f8
Explain the three options for using the User resource
JakeSCahill 6bc505b
Add action to pull acceptance tests
JakeSCahill a0f6862
Add details about autogenerated Secrets/passwords
JakeSCahill 0ff2e7d
Improve structure and add term
JakeSCahill 0d4081f
Update config for new beta
Deflaimun eb9b7ce
First draft
JakeSCahill dcff66f
First draft
JakeSCahill eea0939
Add examples
JakeSCahill fbc6488
Fix tag
JakeSCahill 3764a79
Fix tag
JakeSCahill 2f1e8b8
Explain the three options for using the User resource
JakeSCahill 9e92cd9
Add action to pull acceptance tests
JakeSCahill 4e0ad62
Add details about autogenerated Secrets/passwords
JakeSCahill 99d6caa
Improve structure and add term
JakeSCahill f013516
DOC-442 User resource docs
JakeSCahill f07b62b
Merge branch 'fix-2655' of https://github.com/redpanda-data/docs into…
JakeSCahill f35f75d
Fix comments
JakeSCahill e5f67d7
Fix comments
JakeSCahill e5ac1d1
Fix comments
JakeSCahill 7200db3
Update filename
JakeSCahill 35d3728
Add what's new
JakeSCahill d066e53
First draft
JakeSCahill 5babdfb
First draft
JakeSCahill 286c8b6
Add examples
JakeSCahill 4c72e84
Fix tag
JakeSCahill e5b73b8
Fix tag
JakeSCahill fa7ac8e
Explain the three options for using the User resource
JakeSCahill db863f4
Add action to pull acceptance tests
JakeSCahill 23e70c0
Add details about autogenerated Secrets/passwords
JakeSCahill a462856
Improve structure and add term
JakeSCahill cc2988d
DOC-442 User resource docs
JakeSCahill 8c758ba
Explain the three options for using the User resource
JakeSCahill e907005
Add details about autogenerated Secrets/passwords
JakeSCahill 25f2102
Fix comments
JakeSCahill 81b1c7c
Fix comments
JakeSCahill f403c70
Update filename
JakeSCahill f941a6c
Add what's new
JakeSCahill 3aea3b6
Merge branch 'fix-2655' of https://github.com/redpanda-data/docs into…
JakeSCahill 30bed03
Apply suggestions from code review
JakeSCahill 611c231
Add more links
JakeSCahill 0a11d56
Merge branch 'v-WIP/24.3' into fix-2655
JakeSCahill adeb512
Apply suggestions from code review
JakeSCahill 1e42d15
Merge branch 'v-WIP/24.3' into fix-2655
JakeSCahill 9942852
Apply suggestions from code review
JakeSCahill 9e120c6
Apply suggestions from code review
JakeSCahill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
name: Fetch and Save K8s Acceptance Tests | ||
on: | ||
workflow_dispatch: # Allows manual trigger of the workflow | ||
repository_dispatch: # Allows other repositories to trigger this workflow | ||
types: [trigger-acceptance-test-pull] | ||
jobs: | ||
fetch-and-save: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_SM_READONLY_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SM_READONLY_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-2 | ||
- name: get secrets from aws sm | ||
uses: aws-actions/aws-secretsmanager-get-secrets@v2 | ||
with: | ||
secret-ids: | | ||
,sdlc/prod/github/actions_bot_token | ||
parse-json-secrets: true | ||
|
||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: api | ||
token: ${{ env.ACTIONS_BOT_TOKEN }} | ||
path: redpanda-docs | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd ./redpanda-docs/scripts/fetch-from-github | ||
npm install | ||
|
||
- name: Run the script and save the output | ||
run: node ./redpanda-docs/scripts/fetch-from-github/fetch.js redpanda-data redpanda-operator acceptance/features ../../modules/manage/examples/kubernetes | ||
env: | ||
VBOT_GITHUB_API_TOKEN: ${{ env.ACTIONS_BOT_TOKEN }} | ||
|
||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
commit-message: "auto-docs: Update K8s acceptance tests" | ||
token: ${{ env.ACTIONS_BOT_TOKEN }} | ||
branch: update-acceptance-tests | ||
title: "auto-docs: Update K8s acceptance tests" | ||
body: "This PR auto-updates the acceptance tests that we use as examples in our Kubernetes docs." | ||
labels: auto-docs | ||
reviewers: JakeSCahill |
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,86 @@ | ||
@cluster:sasl | ||
Feature: User CRDs | ||
Background: Cluster available | ||
Given cluster "sasl" is available | ||
|
||
@skip:gke @skip:aks @skip:eks | ||
Scenario: Manage users | ||
Given there is no user "bob" in cluster "sasl" | ||
And there is no user "james" in cluster "sasl" | ||
And there is no user "alice" in cluster "sasl" | ||
When I create CRD-based users for cluster "sasl": | ||
| name | password | mechanism | acls | | ||
| bob | | SCRAM-SHA-256 | | | ||
| james | | SCRAM-SHA-512 | | | ||
| alice | qwerty | SCRAM-SHA-512 | | | ||
Then "bob" should exist and be able to authenticate to the "sasl" cluster | ||
And "james" should exist and be able to authenticate to the "sasl" cluster | ||
And "alice" should exist and be able to authenticate to the "sasl" cluster | ||
|
||
@skip:gke @skip:aks @skip:eks | ||
Scenario: Manage authentication-only users | ||
Given there is no user "jason" in cluster "sasl" | ||
And there are already the following ACLs in cluster "sasl": | ||
| user | acls | | ||
| jason | [{"type":"allow","resource":{"type":"cluster"},"operations":["Read"]}] | | ||
When I apply Kubernetes manifest: | ||
""" | ||
# tag::manage-authn-only-manifest[] | ||
# In this example manifest, a user called "jason" is created in a cluster called "sasl". | ||
# The user's password is defined in a Secret called "jason-password". | ||
# This example assumes that you will create ACLs for this user separately. | ||
--- | ||
apiVersion: cluster.redpanda.com/v1alpha2 | ||
kind: User | ||
metadata: | ||
name: jason | ||
spec: | ||
cluster: | ||
clusterRef: | ||
name: sasl | ||
authentication: | ||
type: scram-sha-512 | ||
password: | ||
valueFrom: | ||
secretKeyRef: | ||
name: jason-password | ||
key: password | ||
# end::manage-authn-only-manifest[] | ||
""" | ||
And user "jason" is successfully synced | ||
And I delete the CRD user "jason" | ||
Then there should be ACLs in the cluster "sasl" for user "jason" | ||
|
||
@skip:gke @skip:aks @skip:eks | ||
Scenario: Manage authorization-only users | ||
Given there are the following pre-existing users in cluster "sasl" | ||
| name | password | mechanism | | ||
| travis | password | SCRAM-SHA-256 | | ||
When I apply Kubernetes manifest: | ||
""" | ||
# tag::manage-authz-only-manifest[] | ||
# In this example manifest, an ACL called "travis" is created in a cluster called "sasl". | ||
# The ACL give an existing user called "travis" permissions to read from all topics whose names start with some-topic. | ||
# This example assumes that you already have a user called "travis" in your cluster. | ||
--- | ||
apiVersion: cluster.redpanda.com/v1alpha2 | ||
kind: User | ||
metadata: | ||
name: travis | ||
spec: | ||
cluster: | ||
clusterRef: | ||
name: sasl | ||
authorization: | ||
acls: | ||
- type: allow | ||
resource: | ||
type: topic | ||
name: some-topic | ||
patternType: prefixed | ||
operations: [Read] | ||
# end::manage-authz-only-manifest[] | ||
""" | ||
And user "travis" is successfully synced | ||
And I delete the CRD user "travis" | ||
Then "travis" should be able to authenticate to the "sasl" cluster with password "password" and mechanism "SCRAM-SHA-256" |
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
6 changes: 6 additions & 0 deletions
6
modules/manage/pages/kubernetes/security/authentication/index.adoc
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,6 @@ | ||
= Authentication for Redpanda in Kubernetes | ||
:page-layout: index | ||
:description: Learn how to configure authentication for Redpanda in Kubernetes using Helm values or the User resource with the Redpanda Operator. | ||
:page-aliases: security:sasl-kubernetes.adoc, manage:kubernetes/security/sasl-kubernetes.adoc, security:kubernetes-sasl.adoc, manage:kubernetes/security/authentication/sasl-kubernetes.adoc, reference:redpanda-operator/kubernetes-mtls.adoc, reference:redpanda-operator/kubernetes-sasl.adoc | ||
|
||
Redpanda offers two methods to manage authentication in a Kubernetes environment. These options allow administrators to control user access and permissions, ensuring secure communication with the Redpanda cluster. |
3 changes: 1 addition & 2 deletions
3
modules/manage/pages/kubernetes/security/authentication/k-authentication.adoc
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just making sure of how these are parsed. We really only care about the manifest examples, right? Just b/c the rest of the test code/scenarios are pretty much irrelevant to the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs pull in anything between the tags. We're using tags for this reason: to avoid pulling in the irrelevant parts.