mirror of
https://github.com/status-im/consul.git
synced 2025-02-03 09:24:25 +00:00
f21b17a1f2
* 6 new components for new login/logout flow, plus SSO support UI Components: 1. AuthDialog: Wraps/orchestrates AuthForm and AuthProfile 2. AuthForm: Authorization form shown when logged out. 3. AuthProfile: Simple presentational component to show the users 'Profile' 4. OidcSelect: A 'select' component for selecting an OIDC provider, dynamically uses either a single select menu or multiple buttons depending on the amount of providers Data Components: 1. JwtSource: Given an OIDC provider URL this component will request a token from the provider and fire an donchange event when it has been retrieved. Used by TokenSource. 2. TokenSource: Given a oidc provider name or a Consul SecretID, TokenSource will use whichever method/API requests required to retrieve Consul ACL Token, which is emitted to the onchange event handler. Very basic README documentation included here, which is likely to be refined somewhat. * CSS required for new auth/SSO UI components * Remaining app code required to tie the new auth/SSO work together * CSS code required to help tie the auth/SSO work together * Test code in order to get current tests passing with new auth/SSO flow ..plus extremely basics/skipped rendering tests for the new components * Treat the secret received from the server as the truth Previously we've always treated what the user typed as the truth, this breaks down when using SSO as the user doesn't type anything to retrieve a token. Therefore we change this so that we use the secret in the API response as the truth. * Make sure removing an dom tree from a buffer only removes its own tree
49 lines
1.4 KiB
Gherkin
49 lines
1.4 KiB
Gherkin
@setupApplicationTest
|
|
Feature: dc / acls / roles / as many / add existing: Add existing
|
|
Scenario:
|
|
Given 1 datacenter model with the value "datacenter"
|
|
And 1 token model from yaml
|
|
---
|
|
AccessorID: key
|
|
Description: The Description
|
|
Roles: ~
|
|
---
|
|
And 2 role models from yaml
|
|
---
|
|
- ID: role-1
|
|
Name: Role 1
|
|
- ID: role-2
|
|
Name: Role 2
|
|
---
|
|
When I visit the token page for yaml
|
|
---
|
|
dc: datacenter
|
|
token: key
|
|
---
|
|
Then the url should be /datacenter/acls/tokens/key
|
|
And I click "form > #roles .ember-power-select-trigger"
|
|
And I click ".ember-power-select-option:first-child"
|
|
And I see 1 role model on the roles component
|
|
And I click "form > #roles .ember-power-select-trigger"
|
|
And I click ".ember-power-select-option:nth-child(1)"
|
|
And I see 2 role models on the roles component
|
|
Then I fill in with yaml
|
|
---
|
|
Description: The Description
|
|
---
|
|
And I submit
|
|
Then a PUT request was made to "/v1/acl/token/key?dc=datacenter" from yaml
|
|
---
|
|
body:
|
|
Namespace: @namespace
|
|
Description: The Description
|
|
Roles:
|
|
- ID: role-1
|
|
Name: Role 1
|
|
- ID: role-2
|
|
Name: Role 2
|
|
---
|
|
Then the url should be /datacenter/acls/tokens
|
|
And "[data-notification]" has the "notification-update" class
|
|
And "[data-notification]" has the "success" class
|