Commit Graph

38 Commits

Author SHA1 Message Date
Cody Jackson 598eb10976 Migrating RBAC to use the norman API 2021-08-16 16:18:36 -07:00
Nancy Butler d492a9884c clean up login toggle logic 2021-06-01 08:03:56 -07:00
Nancy Butler c84e68c7dd reload principal when auth provider enabled/disabled 2021-06-01 07:51:27 -07:00
Richard Cox f5539436d2 Add Keycloak OIDC provider
- Much of the grunt work is generic OIDC

Also fixed
- store's principalId was not updated after user enables any auth provider
- Colour of InfoBox title in dark mode
- Issue where some kind of errors when enabling provider were shown as an empty box (exceptionToErrorsArray is now used, which also uses a better catch all stringify)
- An issue where enabling and disabling a provider in the same visit meant lost defaults
- An issue where Auth / Groups would not display (async part had been removed)
- Resource instance validation would show all fields as invalid once one field had failed
2021-05-25 11:15:32 +01:00
Richard Cox 0b2851032e Improve Role Required Indicators/Validation
- RBAC Role type improvements
  - Remove rule 'Non-Resource URL' field. RBAC role type is namespaced, non-resource url's are not.
  - Apply additional validation (
    - rule resource AND api group required, rather than default rule resource, non-resource url or api group required
    - name is required
  - Show Required indicator for all fields (reflecting validation)
- Other Role type improvements
  - Show Required indicator for rule Verbs field
    - This does mean that when the page initially loads we show an empty rule row with required fields... but user can ignore this and successfully save the role anyway. The alternative is to not show an empty rule to begin with... but this forces the user to `Add Resource`. I feel the later is more of an issue than the former.
  - name is required
2021-04-21 13:48:50 +01:00
Richard Cox b777cf04c1 Improve validation for Roles, Fix empty Rule property bug
- Removed unused code (setVerb/getVerb)
- Improve handling of empty strings when setting arrays in a rule
- Remove required field for api groups for non-rancher types (rbac role/cluster role)
  - There's a lot of validation for these types in the backend that would be tricky to do with the current mechanism up front
    - Namespaced roles cannot use non-resource urls
    - Rules with resources must have api groups (and vice versa)
    - Roles with no rules are ok (guessing this is because there's no validation of the inherit role side)
  - So let the api validation do it's thing for the complex cases on submit
- Apply basic rule validation to non-rancher role types
2021-04-16 10:16:28 +01:00
Richard Cox 0036deb72e Apply `redirectUnauthorized: false` when saving roles
- There's situations where the user does not have permision to create certain rules
- In those cases ensure we don't log the user out
2021-04-13 14:09:22 +01:00
Richard Cox a1b512194b Visual bugs
- Role Rule 'Resources' --> 'Resource
- For disabled radio buttons don't show standard grey colour, use the usual ith opacity
- Ensure default locked value is set after setting up subtype
2021-04-13 13:59:39 +01:00
Richard Cox a4fb564413 Remove required indicator for role rules
- These aren't required by the API
2021-04-13 11:55:03 +01:00
Richard Cox fd3850b2e6 Ensure form/yaml cancel/done return to auth roles page 2021-04-13 11:20:37 +01:00
Richard Cox 4b9120adaf Add Create/Edit/View/Detail Pages for RBAC Role and ClusterRole
- Builds on generic way to handle Management Global Roles and Role Templates
- Applies to rbac.authorization.k8s.io.role and rbac.authorization.k8s.io.clusterrole
2021-04-09 16:15:03 +01:00
Richard Cox 502a136c33 Fix role template 'inherited from' & show inherited rules in details page 2021-04-08 15:43:27 +01:00
Richard Cox c2b98c52e5 Display Global/Cluster/Project roles in Auth Product
- Remove spoofed rbac role template type
- Use spoof's base type's management global role and role template types
- Display these types as global, cluster and project tables in auth product
2021-04-08 14:14:19 +01:00
Nancy Butler a74e2196f6 fix log in with x provider buttons 2021-04-02 15:31:32 -07:00
Richard Cox bae4f7176b Sort global permissions 2021-03-29 15:32:08 +01:00
Richard Cox 7d355462df User - List (actions), Create, Clone, Edit, Details
- Update Users list with actions
- Add User create/edit page
- Add User details page
- Brought over user/principal global role validation from ember world
2021-02-24 11:07:02 +00:00
Nancy Butler dd771ab1e7 do nto allow removing last allowedPrincipal 2021-02-23 15:08:20 -07:00
Neil MacDougall ee8fcaeae6
Merge pull request #2388 from nwmac/fix-minor-auth-issues
Fix for typo in auth config and add header label for users/groups
2021-02-23 13:36:31 +00:00
Neil MacDougall bb2f232394
Fix indentation 2021-02-23 12:45:54 +00:00
Neil MacDougall 12a8b70ddd
Fix lint 2021-02-23 12:17:56 +00:00
Neil MacDougall 8cc6a03f25
Remove bottom margin 2021-02-23 12:11:55 +00:00
Neil MacDougall 6e5791602f
Remove spurious single quote 2021-02-23 12:10:11 +00:00
Neil MacDougall a29cd0666e Fix for typo in auth config and add header label for users/groups 2021-02-23 11:25:57 +00:00
Neil MacDougall 3c704b0343 Merge remote-tracking branch 'upstream/master' into api-keys 2021-02-22 08:56:17 +00:00
Richard Cox 7cc32fc0eb Improve display of Auth Providers Settings
- Make a common component used by all auth providers
- Component contains
  - enabled/disabled banner
  - settings are now aligned in a table

Also centre aligns the saml log in button on the log in page
2021-02-19 09:13:04 +00:00
Lauren Harden ff41fadb17
Merge pull request #2267 from lvuch/lh-refinement
continued refinement, buttons and inputs
2021-02-18 11:01:22 -07:00
Nancy Butler 034a3754d2 fix edit oauth config 2021-02-12 10:08:01 -07:00
Nancy Butler fc4317f6cf add users/groups to saml 2021-02-11 08:05:31 -07:00
lvuch 811887e73a bg primary to role 2021-02-10 14:39:48 -07:00
Neil MacDougall 5a7963e5b0 Merge remote-tracking branch 'upstream/master' into api-keys 2021-02-09 17:43:09 +00:00
Neil MacDougall 88cce544c6 Merge remote-tracking branch 'upstream/master' into api-keys 2021-02-05 15:14:17 +00:00
Richard Cox 57b16e42fe Add Users & Auth / Groups page, assign Global Roles to Groups
- Add groups page with table to the auth product
- Allow user to assign roles to groups previously without roles or edit
  groups with existing roles

Comments
- I haven't added any special ux for the case where there's no auth
  provider and therefore no groups
- ./components/GlobalRoleBindings.vue will be updated when the same
  component is used for assign global roles to a user principal
- ./components/GlobalRoleBindings.vue ln 139 Couldn't create a binding
  without the generateName metadata property. Have given this a
  `ui-` prefix. Is this correct?
- In order to determine which global roles are bound to each principal
  (so we can filter by principals that have them).. we go out and fetch
  ALL role bindings. Is this too costly?
- On the groups page the 'refresh' button is quite big, we should
  consider reducing this
2021-02-04 09:16:52 +00:00
Nancy Butler 4f92b0218f fix ldap/saml add users and groups 2021-02-02 12:01:42 -07:00
Neil MacDougall 36c7d9c287 Merge remote-tracking branch 'upstream/master' into api-keys 2021-02-02 11:13:44 +00:00
Nancy Butler 2cce6462b0 saml ldap login buttons 2021-01-29 12:16:52 -07:00
Richard Cox 3459a1bd41 Show better user info on the accounts page 2021-01-25 15:48:47 +00:00
Vincent Fiduccia 24660e05b1
Auth Provider as catalog-style boxes 2020-12-29 16:05:54 -07:00
Vincent Fiduccia 5304375640
Github auth config, pluggable login component 2020-12-22 14:43:26 -07:00