Skip to content

Commit 195444c

Browse files
matthewelwellguiwriterobertnorriehtessarox0rgus
authored andcommitted
docs: complete restructure of Flagsmith documentation (#6210)
Co-authored-by: Guilherme <guilherme@writechoice.io> Co-authored-by: Robert Norrie <robertnorrie@me.com> Co-authored-by: htessaro <heitor@writechoice.io> Co-authored-by: lucaspr2 <lucasp@writechoice.io> Co-authored-by: wadii <wadii.zaim@flagsmith.com>
1 parent 98ed3fb commit 195444c

File tree

229 files changed

+7520
-8491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+7520
-8491
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# [Flagsmith](https://flagsmith.com/) is an Open-Source Feature Flagging Tool to Ship Faster & Control Releases
2121

22-
Change the way your team releases software. Roll out, segment, and optimise—with granular control. Stay secure with on-premise and private cloud hosting.
22+
Change the way your team releases software. Roll out, segment, and optimise—with granular control. Stay secure with on-premise and private cloud hosting.
2323

2424
* Feature flags: Release features behind the safety of a feature flag
2525
* Make changes remotely: Easily toggle individual features on and off, and make changes without deploying new code

api/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ integrate-private-tests:
151151

152152
.PHONY: generate-docs
153153
generate-docs:
154-
poetry run flagsmith docgen metrics > ../docs/docs/system-administration/metrics.md
154+
poetry run flagsmith docgen metrics > ../docs/docs/administration-and-security/platform-configuration/metrics.md
155155

156156
.PHONY: add-known-sdk-version
157157
add-known-sdk-version:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"label": "Administration and Security",
3+
"position": 4,
4+
"collapsed": true
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"label": "Access Control",
3+
"position": 2,
4+
"collapsed": true
5+
}

docs/docs/system-administration/authentication/05-ADFS.md renamed to docs/docs/administration-and-security/access-control/adfs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
title: ADFS
3+
sidebar_label: ADFS
4+
sidebar_position: 20
35
---
46

57
:::tip

docs/docs/system-administration/authentication/index.md renamed to docs/docs/administration-and-security/access-control/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Authentication
33
description: Customise how your users log in to the Flagsmith dashboard
44
sidebar_label: Overview
5-
sidebar_position: 1
5+
sidebar_position: 10
66
---
77

88
Flagsmith supports a variety of authentication methods for logging into the dashboard:
@@ -21,9 +21,9 @@ Two-factor authentication requires a [Start-Up or Enterprise subscription](https
2121

2222
Using the following authentication methods requires an [Enterprise subscription](https://flagsmith.com/pricing):
2323

24-
- [SAML](/system-administration/authentication/SAML)
25-
- Active Directory (LDAP)
26-
- Microsoft ADFS
24+
- [SAML](/administration-and-security/access-control/saml)
25+
- [Active Directory (LDAP)](/administration-and-security/access-control/ldap)
26+
- [Microsoft ADFS](/administration-and-security/access-control/adfs)
2727

2828
Please get in touch in order to integrate with LDAP or ADFS.
2929

@@ -37,7 +37,7 @@ and authentication methods you want to allow for your users, and when would be a
3737
restrictions.
3838

3939
If you are self-hosting Flagsmith, you can restrict authentication methods per email domain from
40-
[Django Admin](/deployment/configuration/django-admin):
40+
[Django Admin](/deployment-self-hosting/administration-and-maintenance/using-the-django-admin):
4141

4242
1. On the Django Admin sidebar, click on "Domain auth methods".
4343
2. Click "Add domain auth methods".
@@ -50,7 +50,7 @@ If you are self-hosting Flagsmith, you can restrict authentication methods per e
5050
If you are self-hosting Flagsmith, you can disable password authentication by setting the `PREVENT_EMAIL_PASSWORD`
5151
environment variable on the Flagsmith API. This will also hide the username and password fields from the login screen.
5252
Note that this does not disable password authentication for
53-
[Django Admin](/deployment/configuration/django-admin#email-and-password).
53+
[Django Admin](/deployment-self-hosting/administration-and-maintenance/using-the-django-admin#email-and-password).
5454

5555
If you have a private cloud Flagsmith instance, contact Flagsmith support to disable password authentication once
5656
you have successfully set up an alternative authentication method.

docs/docs/system-administration/authentication/04-LDAP.md renamed to docs/docs/administration-and-security/access-control/ldap.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
title: LDAP
3+
sidebar_label: LDAP
4+
sidebar_position: 50
35
---
46

57
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
@@ -10,37 +12,37 @@ LDAP authentication requires a self-hosted [Enterprise subscription](https://fla
1012

1113
:::
1214

13-
Flagsmith can be configured to use LDAP for authentication with [environment variables](#backend-environment-variables).
14-
When enabled, it works by authenticating the user with username and password using the ldap server, fetching the user
15-
details from the LDAP server (if the authentication was successful) and creating the user in the Django database.
15+
Flagsmith can be configured to use LDAP for authentication with [environment variables](#backend-environment-variables).
16+
17+
When LDAP is enabled, it works by authenticating the user with username and password using the ldap server, fetching the user details from the LDAP server (if the authentication was successful) and creating the user in the Django database.
1618

1719
## Using Microsoft Active Directory
1820

19-
By default, Flagsmith supports logging in via OpenLDAP. To connect to a Microsoft Active Directory, you need to modify
20-
the following environment variables.
21+
By default, Flagsmith supports logging in via OpenLDAP. To connect to a Microsoft Active Directory, you need to modify the following environment variables.
22+
23+
Flagsmith provides different `LDAP_AUTH_FORMAT_USERNAME` settings to accommodate various Active Directory username formats:
2124

22-
For simple usernames (e.g. "username"):
25+
- **Simple usernames** (e.g. "username"):
2326

2427
```txt
2528
LDAP_AUTH_FORMAT_USERNAME="django_python3_ldap.utils.format_username_active_directory"
2629
```
2730

28-
For down-level login name formats (e.g. "DOMAIN\username"):
31+
- **Down-level login name formats** (e.g. "DOMAIN\username"):
2932

3033
```txt
3134
LDAP_AUTH_FORMAT_USERNAME="django_python3_ldap.utils.format_username_active_directory"
3235
LDAP_AUTH_ACTIVE_DIRECTORY_DOMAIN="DOMAIN"
3336
```
3437

35-
For user-principal-name formats (e.g. "user@domain.com"):
38+
- **User-principal-name formats** (e.g. "user@domain.com"):
3639

3740
```txt
3841
LDAP_AUTH_FORMAT_USERNAME="django_python3_ldap.utils.format_username_active_directory_principal"
3942
LDAP_AUTH_ACTIVE_DIRECTORY_DOMAIN="domain.com"
4043
```
4144

42-
Depending on how your Active Directory server is configured, the following additional settings may match your server
43-
better than the defaults used by django-python3-ldap:
45+
Depending on how your Active Directory server is configured, the following additional settings may match your server better than the defaults used by django-python3-ldap:
4446

4547
```txt
4648
LDAP_AUTH_USER_FIELDS=username=sAMAccountName,email=mail,first_name=givenName,last_name=sn
@@ -49,8 +51,7 @@ LDAP_AUTH_OBJECT_CLASS="user"
4951

5052
## Sync LDAP groups
5153

52-
You can synchronise Flagsmith users and groups with your LDAP (Directory) users and groups by running the following
53-
command:
54+
You can synchronise Flagsmith users and groups with your LDAP (Directory) users and groups by running the following command:
5455

5556
```bash
5657
python manage.py sync_ldap_users_and_groups
@@ -63,7 +64,7 @@ Running this command will:
6364
- Remove users from group if they no longer belong to that group in Directory
6465
- Add users to group if they belong to a new group in Directory
6566

66-
:::note Before running this command, please make sure to set the following environment variables:
67+
:::note Before running the synchronisation command, please make sure to set the following environment variables:
6768

6869
- LDAP_SYNC_USER_USERNAME
6970
- LDAP_SYNC_USER_PASSWORD
@@ -75,9 +76,7 @@ Running this command will:
7576

7677
## Backend environment variables
7778

78-
Note that some environment variables may be different depending on the image that you are using
79-
(`flagsmith/flagsmith-api-ee` or `flagsmith/flagsmith-private-cloud`). Please select the correct tab below to ensure you
80-
are using the correct environment variables.
79+
Note that some environment variables may be different depending on the image that you are using (`flagsmith/flagsmith-api-ee` or `flagsmith/flagsmith-private-cloud`). Please select the correct tab below to ensure you are using the correct environment variables.
8180

8281
<Tabs groupId="ImageType">
8382
<TabItem value="ee" label="flagsmith-api-ee">
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: OAuth
3+
sidebar_label: OAuth
4+
sidebar_position: 40
5+
---
6+
7+
This guide explains how to set up OAuth authentication for Flagsmith using Google and GitHub as identity providers. OAuth allows your users to log in to Flagsmith using their existing credentials from these services.
8+
9+
## Prerequisites
10+
11+
- Administrative access to your Flagsmith instance to configure environment variables and Flagsmith on Flagsmith flags.
12+
- An account with Google Cloud Console and/or GitHub with permissions to create OAuth applications.
13+
14+
## Configure OAuth for Google
15+
16+
Follow these steps to set up OAuth with Google:
17+
18+
1. Follow Google's official guide on [Setting up OAuth 2.0](https://support.google.com/cloud/answer/6158849?hl=en) to create your OAuth 2.0 client ID and client secret.
19+
- Create the Flagsmith on Flagsmith flag as detailed in the [deployment documentation](/deployment-self-hosting/core-configuration/environment-variables#oauth-google).
20+
21+
## Configure OAuth for GitHub
22+
23+
As a pre-requisite for this configuration make sure to have [Flagsmith on Flagsmith](/deployment-self-hosting/core-configuration/running-flagsmith-on-flagsmith) set up. Follow these steps to set up OAuth with GitHub:
24+
25+
1. Configure the following environment variables:
26+
- `GITHUB_CLIENT_ID`
27+
- `GITHUB_CLIENT_SECRET`
28+
29+
2. Configure OAuth for GitHub:
30+
- [Create an OAuth GitHub application](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app)
31+
- For the Authorization callback URL use: `https://<your flagsmith domain name>/oauth/github`
32+
3. Create the Flagsmith on Flagsmith flag as it shows [here](/deployment-self-hosting/core-configuration/environment-variables#oauth-github).
33+
34+
Now you would be able to see the GitHub SSO option.
35+
36+
<div style={{textAlign: 'center'}}><img width="75%" src="/img/Flagsmith_GitHub_SignUp.png"/></div>
37+
38+
## See Also
39+
40+
- [Flagsmith Deployment Documentation](/deployment-self-hosting/core-configuration/running-flagsmith-on-flagsmith): For detailed information on setting up "Flagsmith on Flagsmith" and related configurations.
41+
- [SAML SSO](/administration-and-security/access-control/saml): For information on configuring SAML-based SSO.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Okta
3+
sidebar_label: Okta
4+
sidebar_position: 30
5+
---
6+
7+
Flagsmith can integrate with Okta single sign-on (SSO) by using SAML. We provide a first-party Okta integration to simplify the setup. This guide explains how to integrate Flagsmith with Okta SSO.
8+
9+
## Prerequisites
10+
11+
Before you begin, ensure you have:
12+
13+
- Access to your Flagsmith organisation with permissions to create and manage SAML configurations.
14+
- An Okta account with administrative access to add and configure applications.
15+
16+
17+
## Configure Okta SSO
18+
19+
Follow these steps to set up the Flagsmith Okta integration:
20+
21+
1. Create a [Flagsmith SAML configuration](/administration-and-security/access-control/saml#setup). You can leave the identity provider metadata blank for now.
22+
2. Add the [Flagsmith Okta integration](https://www.okta.com/integrations/flagsmith/) to your Okta account, and open it in the Okta dashboard.
23+
3. Select the "Sign On" tab, and click "Edit".
24+
4. Under "Advanced Sign-on Settings", fill out these fields and then click Save:
25+
- **API Base URL** should be `https://api.flagsmith.com` on SaaS, or your API root URL otherwise.
26+
- **SAML Organisation** should be the name of the SAML configuration you previously created.
27+
5. Staying on the "Sign On" tab, find the "Metadata URL" in the "Sign on methods" section. Save this metadata to a file and upload it to the "IdP Metadata XML" of your Flagsmith SAML configuration.
28+
29+
Once your Flagsmith SAML configuration has your Okta IdP metadata set, your users can log in to Flagsmith with Okta by clicking "Single Sign-On" at the login page, and typing the name of the SAML configuration you created.
30+
31+
## User attributes
32+
33+
By default, the Flagsmith Okta integration will map your users' Okta email address, given name and surname so that they are visible within Flagsmith. If you need to map different attributes, you can [customise the attribute mappings](/administration-and-security/access-control/saml#attribute-mapping) on your SAML configuration.

0 commit comments

Comments
 (0)