Skip to content

Commit

Permalink
Add mapper endpoints and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Oct 16, 2023
1 parent 8dbf0e3 commit 63f2d7e
Show file tree
Hide file tree
Showing 21 changed files with 1,325 additions and 21 deletions.
23 changes: 17 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,22 @@ groups = [
]
```

```bash
cargo run -p rfd-cli mapper create --json-body /dev/stdin <<EOM
{
"name": "add_email_address",
"max_activations": 1,
"rule": {
"rule": "email_address",
"email": "[email protected]",
"groups": [
"admin"
]
}
}
EOM
```

**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.
Expand All @@ -330,6 +346,22 @@ groups = [
]
```

```bash
cargo run -p rfd-cli mapper create --json-body /dev/stdin <<EOM
{
"name": "add_email_domain",
"max_activations": 5,
"rule": {
"rule": "email_domain",
"domain": "domain.com",
"groups": [
"company-employee"
]
}
}
EOM
```

**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.

Expand All @@ -341,4 +373,20 @@ domain = "githubuser"
groups = [
"friend-of-company"
]
```

```bash
cargo run -p rfd-cli mapper create --json-body /dev/stdin <<EOM
{
"name": "add_github_user",
"max_activations": 1,
"rule": {
"rule": "git_hub_username",
"github_username": "githubuser",
"groups": [
"friend-of-company"
]
}
}
EOM
```
Loading

0 comments on commit 63f2d7e

Please sign in to comment.