Skip to content

Commit

Permalink
More mapper notes
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Oct 13, 2023
1 parent 20e6b29 commit 3c676c7
Showing 1 changed file with 37 additions and 4 deletions.
41 changes: 37 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
```

0 comments on commit 3c676c7

Please sign in to comment.