-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat: allow specifying disable-auth when creating the server #1251
Conversation
Signed-off-by: Keran Yang <[email protected]>
Signed-off-by: Keran Yang <[email protected]>
Signed-off-by: Keran Yang <[email protected]>
Signed-off-by: Keran Yang <[email protected]>
server/routes/routes.go
Outdated
@@ -30,6 +30,8 @@ type SystemInfo struct { | |||
ManagedNamespace string `json:"managedNamespace"` | |||
Namespaced bool `json:"namespaced"` | |||
Version string `json:"version"` | |||
DisableAuth bool `json:"disableAuth"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This SystemInfo
is exposed to the client, do not add those information to this struct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. I am going to create a separate struct AuthInfo to hold the DisableAuth
and DexServerAddr
, hence the /systemInfo
API call won't expose auth configurations.
Signed-off-by: Keran Yang <[email protected]>
Signed-off-by: Keran Yang <[email protected]>
Signed-off-by: Keran Yang <[email protected]>
Signed-off-by: Keran Yang <[email protected]>
isn't it better to disable auth by default, and enable only on-demand. which experience will be better for users testing it out? |
@@ -38,6 +38,8 @@ spec: | |||
image: quay.io/numaproj/numaflow:latest | |||
args: | |||
- "server" | |||
# By default, turn off authentication and authorization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc: @vigith This also replies to your comment above. :)
Signed-off-by: Keran Yang <[email protected]>
cmd/commands/server.go
Outdated
@@ -64,7 +64,7 @@ func NewServerCommand() *cobra.Command { | |||
command.Flags().BoolVar(&namespaced, "namespaced", false, "Whether to run in namespaced scope, defaults to false.") | |||
command.Flags().StringVar(&managedNamespace, "managed-namespace", sharedutil.LookupEnvStringOr("NAMESPACE", "numaflow-system"), "The namespace that the server watches when \"--namespaced\" is \"true\".") | |||
command.Flags().StringVar(&baseHref, "base-href", "/", "Base href for Numaflow server, defaults to '/'.") | |||
command.Flags().BoolVar(&disableAuth, "disable-auth", false, "Whether to disable authentication, defaults to false.") | |||
command.Flags().BoolVar(&disableAuth, "disable-auth", true, "Whether to disable authentication and authorization, defaults to true for easy on-boarding.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to set the default to false
here, but add the arg true
in the manifests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good.
Signed-off-by: Keran Yang <[email protected]>
User can update the numaflow deployment to turn on and off AuthN/AuthZ by passing in an argument.
Tested by turning on and off the auth and verifying that after turning it off, my read-only role can perform write operations like CreatePipeline.