Skip to content

Commit 3b1bbc6

Browse files
authored
Merge branch 'main' into RHIDP-3972-chapter-1-enabling-the-rbac-plugin
2 parents 235e9f2 + f1a9cbf commit 3b1bbc6

File tree

7 files changed

+66
-17
lines changed

7 files changed

+66
-17
lines changed

.github/workflows/build-asciidoc.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name: GitHub Pages
1717

1818
on:
1919
push:
20-
branches:
20+
branches:
2121
- main
2222
- rhdh-1.**
2323
- 1.**.x
@@ -41,14 +41,14 @@ jobs:
4141
run: |
4242
# update
4343
sudo apt-get update -y || true
44-
# install
45-
sudo apt-get -y -q install asciidoctor && asciidoctor --version
44+
# install
45+
sudo apt-get -y -q install podman && podman --version
4646
echo "GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
4747
4848
- name: Build guides and indexes
4949
run: |
5050
echo "Building branch ${{ env.GIT_BRANCH }}"
51-
build/scripts/build.sh -b ${{ env.GIT_BRANCH }}
51+
build/scripts/build-ccutil.sh -b ${{ env.GIT_BRANCH }}
5252
5353
# repo must be public for this to work
5454
- name: Deploy
@@ -60,7 +60,7 @@ jobs:
6060
keep_files: true
6161
publish_dir: ./titles-generated
6262

63-
- name: Cleanup merged PR branches
63+
- name: Cleanup merged PR branches
6464
run: |
6565
PULL_URL="https://api.github.com/repos/redhat-developer/red-hat-developers-documentation-rhdh/pulls"
6666
GITHUB_TOKEN="${{ secrets.RHDH_BOT_TOKEN }}"
@@ -70,7 +70,7 @@ jobs:
7070
git checkout gh-pages; git pull || true
7171
dirs=$(find . -maxdepth 1 -name "pr-*" -type d | sed -r -e "s|^\./pr-||")
7272
refs=$(cat pulls.html | grep pr- | sed -r -e "s|.+.html>pr-([0-9]+)</a>.+|\1|")
73-
for d in $(echo -e "$dirs\n$refs" | sort -uV); do
73+
for d in $(echo -e "$dirs\n$refs" | sort -uV); do
7474
PR="${d}"
7575
echo -n "Check merge status of PR $PR ... "
7676
PR_JSON=$(curl -sSL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GITHUB_TOKEN" "$PULL_URL/$PR")

assemblies/assembly-authenticating-with-github.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[id="assembly-auth-provider-github"]
2-
= Enabling the GitHub authentication provider
1+
[id="authenticating-with-github"]
2+
= Authenticating with GitHub
33

44
To authenticate users with GitHub or GitHub Enterprise:
55

assemblies/assembly-configuring-authorization-in-rhdh.adoc

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,30 @@
11
[id='configuring-authorization-in-rhdh']
22
= Configuring authorization in {product}
33

4-
include::modules/authorization/con-rbac-overview.adoc[leveloffset=+1]
4+
In link:{authorization-book-url}[{authentication-book-title}], you learnt how to authenticate users to {product}.
5+
{product-short} knowns who the users are.
6+
7+
In this book, learn how to authorize users to perform actions in {product-short}.
8+
Define what users can do in {product-short}.
9+
10+
Role-Based Access Control (RBAC) is a security concept that controls access to resources in a system, and specifies a mapping between users of the system, and the actions they can perform on resources in the system.
11+
You define roles with specific permissions, and then assign the roles to users and groups.
12+
13+
RBAC on {product-short} is built on top of the Permissions framework, which defines RBAC policies in code.
14+
Rather than defining policies in code,
15+
the {product-short} RBAC feature allows you
16+
to define policies in a declarative fashion using a simple CSV based format.
17+
You can define the policies by using {product-short} web interface or REST API, rather than editing the CSV directly.
18+
19+
To apply RBAC in {product-short}:
20+
21+
. The {product-short} administrator sets up the RBAC feature:
22+
.. Enable the RBAC feature
23+
.. Configure Policy Administrators
24+
25+
. The {product-short} policy administrator configures your RBAC policies:
26+
.. Define roles with specific permissions
27+
.. Assign the roles to users and groups
528

629

730
include::modules/authorization/proc-enabling-the-rbac-plugin.adoc[leveloffset=+1]

modules/authentication/proc-enabling-authentication-with-github.adoc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,39 @@ auth:
159159
enterpriseInstanceUrl: ${GITHUB_HOST_DOMAIN}
160160
----
161161

162+
[TIP]
163+
====
164+
To enable GitHub integration with a different authentication provider, complete the following configurations:
165+
166+
* Add the GitHub provider to the existing `auth` section.
167+
* Keep the `signInPage` section from your authentication provider configuration.
168+
169+
.`app-config-rhdh.yaml` fragment with mandatory fields to enable GitHub integration and use a different authentication provider
170+
[source,yaml,subs="+quotes"]
171+
----
172+
auth:
173+
environment: production
174+
providers:
175+
github:
176+
production:
177+
clientId: ${AUTH_GITHUB_CLIENT_ID}
178+
clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}
179+
__<your_other_authentication_providers_configuration>__
180+
integrations:
181+
github:
182+
- host: ${GITHUB_HOST_DOMAIN}
183+
apps:
184+
- appId: ${AUTH_GITHUB_APP_ID}
185+
clientId: ${AUTH_GITHUB_CLIENT_ID}
186+
clientSecret: ${GITHUB_CLIENT_SECRET}
187+
webhookUrl: ${GITHUB_WEBHOOK_URL}
188+
webhookSecret: ${GITHUB_WEBHOOK_SECRET}
189+
privateKey: |
190+
${GITHUB_PRIVATE_KEY_FILE}
191+
signInPage: __<your_main_authentication_provider>__
192+
----
193+
====
194+
162195
--
163196

164197
.Verification

modules/authorization/con-rbac-overview.adoc

Lines changed: 0 additions & 6 deletions
This file was deleted.

modules/importing-repositories/procedure-enabling-the-bulk-import-from-github-feature.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
You can enable the Bulk Import feature for users and give them the necessary permissions to access it.
44

55
.Prerequisites
6-
* You have link:{authentication-book-url}#enabling-authentication-with-github[configured GitHub authentication and integration].
6+
* You have link:{authentication-book-url}#enabling-authentication-with-github[configured GitHub integration].
77

88
.Procedure
99

modules/importing-repositories/procedure-importing-multiple-repositories-from-github.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
In {product}, you can select your GitHub repositories and automate their onboarding to the {product-short} catalog.
55

66
.Prerequisites
7-
* You have link:{authentication-book-url}#enabling-authentication-with-github[configured GitHub authentication and integration].
87
* You have xref:enabling-and-giving-access-to-the-bulk-import-feature[enabled the Bulk Import feature and gave access to it].
98

109
.Procedure

0 commit comments

Comments
 (0)