Skip to content

Dov/auth-doc-upgrade #32657

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

Conversation

DAlperin
Copy link
Member

@DAlperin DAlperin commented Jun 4, 2025

Motivation

Tips for reviewer

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

kay-kim and others added 30 commits January 14, 2025 23:51
…able-logic-self-managed-branch

docs: selector needs to filter out /docs from /docs/self-managed
Fall back to local versions.json when global one is missing.

Concatenate paths for links correctly
…d-versions-file-path-tweak

docs: tweak fallback versions.json path
MaterializeInc#31076)

…l (MaterializeInc#31069)"

This reverts commit d67de03. Revert as
the name change is an upcoming change (i.e., not yet available)
…nc#31129)

In prep for release, using `v25.1.0` instead of `v25.1.0-beta.1`
kay-kim and others added 18 commits April 28, 2025 14:53
…raform

self-managed docs: Bump terraform versions too
@DAlperin DAlperin requested a review from a team as a code owner June 4, 2025 19:24
@DAlperin DAlperin force-pushed the dov/auth-doc-upgrade branch from 79c033a to e416002 Compare June 4, 2025 19:34
@kay-kim kay-kim changed the base branch from self-managed-docs/v25.1 to self-managed-docs/v25.2 June 4, 2025 19:49
Comment on lines +14 to +16
```mzsql

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh ... remove?

Suggested change
```mzsql
```

```mzsql
CREATE ROLE _role_name_ [WITH [SUPERUSER | NOSUPERUSER ]
[ LOGIN | NOLOGIN ]
[ INHERIT | NOINHERIT ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove NOINHERIT here since we don't support it for CREATE ROLE.
Per mention in the SQL meeting, will note that we've remove from the docs in our issue ... so that, later on, after Xmonths have passed, we can just remove it from our code base.

| `SUPERUSER` | Materialize does not support the `SUPERUSER` option for `CREATE ROLE`.<ul><li>Instead, Materialize derives the `SUPERUSER` option for a role during authentication every time that role tries to connect.</li></ul>|
| Option | Description |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `INHERIT` | Materialize implicitly uses `INHERIT` for the `CREATE ROLE` command. That is, `CREATE ROLE <name>` and `CREATE ROLE <name> WITH INHERIT` are equivalent. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ...
we lost the "Grants the role the ability to inherit privileges of other roles."
I would make this:

Optional. If specified, grants the role the ability to inherit privileges of other roles. (Default)

| Option | Description |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `INHERIT` | Materialize implicitly uses `INHERIT` for the `CREATE ROLE` command. That is, `CREATE ROLE <name>` and `CREATE ROLE <name> WITH INHERIT` are equivalent. |
| `NOINHERIT` | Materialize does not support the `NOINHERIT` option for `CREATE ROLE`. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove

Suggested change
| `NOINHERIT` | Materialize does not support the `NOINHERIT` option for `CREATE ROLE`. |

| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `INHERIT` | Materialize implicitly uses `INHERIT` for the `CREATE ROLE` command. That is, `CREATE ROLE <name>` and `CREATE ROLE <name> WITH INHERIT` are equivalent. |
| `NOINHERIT` | Materialize does not support the `NOINHERIT` option for `CREATE ROLE`. |
| `LOGIN` | The `LOGIN` attribute allows a role to login via the postgresql or web endpoints |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would capitalize PostgreSQL

Optional. If specified, allows


## Examples

```mzsql
CREATE ROLE db_reader;
CREATE ROLE db_reader WITH LOGIN PASSWORD 'password';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably annotate these examples with what these are actually doing ... but ... eh.

Comment on lines +14 to +17
ALTER ROLE _role_name_ [WITH [SUPERUSER | NOSUPERUSER ]
[ LOGIN | NOLOGIN ]
[ INHERIT | NOINHERIT ]
[ PASSWORD <text> ]] [SET _name_ TO _value_]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since our syntax doesn't render italics:

Suggested change
ALTER ROLE _role_name_ [WITH [SUPERUSER | NOSUPERUSER ]
[ LOGIN | NOLOGIN ]
[ INHERIT | NOINHERIT ]
[ PASSWORD <text> ]] [SET _name_ TO _value_]
ALTER ROLE <role_name> [WITH [SUPERUSER | NOSUPERUSER ]
[ LOGIN | NOLOGIN ]
[ INHERIT | NOINHERIT ]
[ PASSWORD <text> ]] [SET <name> TO <value> ]


```mzsql
ALTER ROLE rj PASSWORD NULL;
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe adda warning

{{< warning >}}
Setting a NULL password removes the password requirement.
{{< /warning >}}

##### Making a role a superuser

```mzsql
ALTER ROLE rj SUPERUSER;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, since we do an example with setting this role password NULL below (even though it's not really sequential), you might change this to NOSUPERUSER instead of SUPERUSER

| Field | Use |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **INHERIT** | Grants the role the ability to inherit privileges of other roles. |
| `LOGIN` | The `LOGIN` attribute allows a role to login via the postgresql or web endpoints |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capitalize PostgreSQL?

Also, for my edification, is the web endpoint referring to the http endpoint?

@kay-kim kay-kim force-pushed the self-managed-docs/v25.2 branch from 06659ed to 50b3520 Compare June 6, 2025 01:53
@kay-kim kay-kim requested a review from a team as a code owner June 6, 2025 01:53
@kay-kim
Copy link
Contributor

kay-kim commented Jun 6, 2025

Apologies .. you'll need to rebase. I ended up branching off main and replaying the self-managed docs changes on top of that to get everything between v25.1 and v25.2

@kay-kim kay-kim force-pushed the self-managed-docs/v25.2 branch 2 times, most recently from 11a384a to 646ccab Compare June 9, 2025 15:38
@DAlperin
Copy link
Member Author

superseded by #32697

@DAlperin DAlperin closed this Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants