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

Auth + config file support #86

Merged
merged 3 commits into from
Sep 7, 2023
Merged

Auth + config file support #86

merged 3 commits into from
Sep 7, 2023

Conversation

setrofim
Copy link
Contributor

@setrofim setrofim commented Aug 29, 2023

Add support for remote service authentication to the corim submit
sub-command.

Associated with it is support for loading configuration from a file
(note: technically this was already present but was kind of broken and
wasn't actually used for any configuration.)

Make api-server configurable via the config file, as well as the command
line flag. This removes the need to specify --api-server flag on each
corim submit sub-command invocation (given that this setting is going to
be fairly static for a particular setup).

Add test-generated binaries to .gitignore.

Signed-off-by: Sergei Trofimov <[email protected]>
@setrofim setrofim changed the title [RFC] Auth + config file support Auth + config file support Sep 5, 2023
@@ -437,6 +437,16 @@ $ cocli corim submit \
>> "corim.cbor" submit ok
```

#### Remote Service Authentication

The above will work if the remote service does not authenticate
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a question here, more than a comment.

Does the cocli configuration, in any way needs to be synchronised with the
equivalent configuration on the services and apiclient side?
Specifically my question originates from the following line 11 on the config file:
( auth: none)

Copy link
Contributor

Choose a reason for hiding this comment

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

Also it would be good to specify what is the default cocli behaviour!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This configuration is used to configure the apiclient so no synchronisation needed, as such, for that. The configuration for cocli does need to match the corresponding configuration for the service it is contacting.

The default is set in the example config, and is specified in the help for the corresponding flag (when you do cocli corim submit -h).

Copy link
Contributor

@yogeshbdeshpande yogeshbdeshpande left a comment

Choose a reason for hiding this comment

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

Left some comments, but in general LGTM!

Copy link
Contributor

@yogeshbdeshpande yogeshbdeshpande left a comment

Choose a reason for hiding this comment

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

Minor nits but LGTM!

Add support for remote service authentication to the `corim submit`
sub-command.

Associated with it is support for loading configuration from a file
(note: technically this was already present but was kind of broken and
wasn't actually used for any configuration.)

Signed-off-by: Sergei Trofimov <[email protected]>
Make api-server configurable via the config file, as well as the command
line flag. This removes the need to specify --api-server flag on each
corim submit sub-command invocation (given that this setting is going to
be fairly static for a particular setup).

Signed-off-by: Sergei Trofimov <[email protected]>
@setrofim setrofim merged commit fc51bb6 into main Sep 7, 2023
9 checks passed
@setrofim setrofim deleted the auth branch September 7, 2023 10:42
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.

3 participants