Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document disabling default import rule #50324

Merged
merged 5 commits into from
Dec 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/pages/enroll-resources/database-access/rbac.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,35 @@
version: v1
```

### Disabling the default import rule

Teleport expects at least one import rule to be defined. If it is missing, the auth server will create a default import rule on startup.

Check warning on line 269 in docs/pages/enroll-resources/database-access/rbac.mdx

View workflow job for this annotation

GitHub Actions / Lint docs prose style

[vale] reported by reviewdog 🐶 [messaging.consistent-terms] For consistent product messaging in the docs, use '\"Auth Service\" (or \"Auth Service instance\" for a specific node)' instead of 'auth server'. Raw Output: {"message": "[messaging.consistent-terms] For consistent product messaging in the docs, use '\\\"Auth Service\\\" (or \\\"Auth Service instance\\\" for a specific node)' instead of 'auth server'.", "location": {"path": "docs/pages/enroll-resources/database-access/rbac.mdx", "range": {"start": {"line": 269, "column": 80}}}, "severity": "WARNING"}
Tener marked this conversation as resolved.
Show resolved Hide resolved

If you don't want to import any database objects, create a rule that matches no databases. In the example below, the list of matching label values is empty, so no database will ever match this selector.

```yaml
kind: db_object_import_rule
metadata:
name: import_no_objects
spec:
database_labels:
- {}
mappings:
- {}
version: v1
```

Create the custom rule and remove the default one:

{/* spell-checker: disable */}
```text
> tctl create -f import_no_objects.yaml
rule "import_no_objects" has been created
> tctl rm db_object_import_rule/import_all_objects
Rule "import_all_objects" has been deleted
```
Tener marked this conversation as resolved.
Show resolved Hide resolved
{/* spell-checker: enable */}

### Database admin user

A database admin user is responsible for granting permissions to end users. You
Expand Down
Loading