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

Display authorization settings to UIS owner? #264

Open
hjoliver opened this issue Oct 20, 2021 · 2 comments
Open

Display authorization settings to UIS owner? #264

hjoliver opened this issue Oct 20, 2021 · 2 comments
Labels
authorization question Flag this as a question for the next Cylc project meeting.
Milestone

Comments

@hjoliver
Copy link
Member

See also #259

Authorization config requires valid Python syntax as well as the correct data structure and item names and values. Any error results in the user config being silently ignored. (Accessing user permissions are logged, if logging with sufficient verbosity, to the hub console, but that ain't much use).

We should probably display a table of authorization settings in the UI, for the authenticated UIS owner to see, and encourage users to double check that after making any changes.

@hjoliver hjoliver added question Flag this as a question for the next Cylc project meeting. authorization labels Oct 20, 2021
@hjoliver hjoliver added this to the cylc-uiserver 1.0.0 milestone Oct 20, 2021
@hjoliver
Copy link
Member Author

Note the Authorized Operations User Profile div in @datamel's cylc/cylc-ui#728 goes some way toward this, in that dashboard (and user profile) are relative to the target, not authenticated, user.

@oliver-sanders
Copy link
Member

We have some minimal validation for the site-config -

@validate('site_authorization')
def _check_site_auth_dict_correct_format(self, proposed):
# TODO: More advanced auth dict validating
if isinstance(proposed['value'], dict):
return proposed['value']
raise TraitError(
f'Error in site authorization config: {proposed["value"]}')

This could be improved and expanded to the user config which could then fail for invalid configs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authorization question Flag this as a question for the next Cylc project meeting.
Projects
None yet
Development

No branches or pull requests

2 participants