-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20e6b29
commit 3c676c7
Showing
1 changed file
with
37 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -231,13 +231,46 @@ the user account associated with the user provider. | |
|
||
Notably this means that mappers explicitly only run when a user authenticates via a remote provider. | ||
|
||
A `mappers.toml` file can be used to configure mappers that should be installed during startup of | ||
the RFD API. | ||
|
||
#### Supported Mappers | ||
|
||
Email Address - Maps from a fully specified email address to a list of permissions and/or list of groups. | ||
This mapper can be used with GitHub or Google. | ||
**Email Address** - Maps from a fully specified email address to a list of permissions and/or list of groups. This mapper can be used with GitHub or Google. | ||
|
||
```toml | ||
[[mappers]] | ||
name = "Initial admin" | ||
rule = "email_address" | ||
email = "[email protected]" | ||
groups = [ | ||
"admin" | ||
] | ||
``` | ||
|
||
Email Domain - Maps from a email domain to a list of permissions and/or list of groups. This mapper can be | ||
**Email Domain** - Maps from a email domain to a list of permissions and/or list of groups. This mapper can be | ||
used with GitHub or Google. | ||
|
||
GitHub Username - Maps from a GitHub username to a list of permissions and/or list of groups. As expected, | ||
```toml | ||
[[mappers]] | ||
name = "Employees" | ||
rule = "email_domain" | ||
domain = "domain.com" | ||
groups = [ | ||
"company-employee" | ||
] | ||
``` | ||
|
||
**GitHub Username** - Maps from a GitHub username to a list of permissions and/or list of groups. As expected, | ||
this mapper can only succeed with a GitHub provider. | ||
|
||
|
||
```toml | ||
[[mappers]] | ||
name = "Friend" | ||
rule = "github_username" | ||
domain = "githubuser" | ||
groups = [ | ||
"friend-of-company" | ||
] | ||
``` |