Skip to content

Add password auth support #47

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

Merged
merged 4 commits into from
Jun 24, 2025
Merged

Add password auth support #47

merged 4 commits into from
Jun 24, 2025

Conversation

bobbyiliev
Copy link
Collaborator

@bobbyiliev bobbyiliev commented Jun 12, 2025

Once the new release is ready and this is merged, we should also merge the following along with bumping the module version accordingly:

- Determines how users authenticate with the Materialize instance.
- Valid values are:
- `"None"` (default): No password authentication is enabled.
- `"Password"`: Enables password authentication for the `mz_system` user. When set to `"Password"`, you **must** provide a value for `external_login_password_mz_system`.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is totally fine, but we could also generate one for them if they don't provide one.

]
```

If `authenticator_kind` is not set or set to `"None"`, password authentication is disabled and `external_login_password_mz_system` is ignored.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we cause an error instead? I'm afraid someone might set external_login_password_mz_system and be confused that they can still log in without a password because they forgot to set the authenticator_kind.

An even more intuitive scheme would be to only have a password, and if it's set, switch the authenticator kind to password, otherwise none.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point! Just updated this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I do agree this is the easiest to use, but it's also creates an interface that doesn't map with the k8s crd or envd binary. In this case, I think the cleanest thing to do is mirror the underlying behavior.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hm yes, I see your point. I do like the simplicity of the implicit behavior, but happy to revert the last change if @def- and @alex-hunt-materialize agree that staying closer to the original model is the better call here.

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 also make it more intuitive in k8s crd/envd binary!

Copy link
Contributor

Choose a reason for hiding this comment

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

From my experience it's generally acceptable to only read flags for a feature when that feature is enabled and to ignore them when the feature is disabled without error. This is especially true on the helm chart side.

I think keeping our logic to match the CRD (not doing any TF magic) is going to provide the best continuity of understanding as users dig deeper into problems and start looking at k8s directly. It's definitely possible that we want to simplify the crd/envd binary. I think we can resist that later, especially if the configuration gets more complex.

bobbyiliev and others added 2 commits June 12, 2025 14:37
@jubrad jubrad merged commit 5477148 into main Jun 24, 2025
1 check passed
@jubrad jubrad deleted the add-auth-support branch June 24, 2025 05:12
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.

4 participants