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

Invite users to an org or space #3377

Merged
merged 58 commits into from
Feb 19, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
8c86ef7
Merge remote-tracking branch 'origin/v2-master' into invite-users
nwmac Jan 25, 2019
366869b
WIP
nwmac Jan 25, 2019
04ad893
WIP - Add stepper with new step, routing and list button (tbd)
richard-cox Jan 25, 2019
b59bb53
WIP - Added stacked input & mostly fleshed out
richard-cox Jan 29, 2019
46ef39a
WIP - Flesh out step 1 with instructions, special case of space level
richard-cox Jan 29, 2019
28ea51c
Add email library
nwmac Jan 30, 2019
93cd3ed
v2/v3 api docs updates
richard-cox Jan 25, 2019
9c2b5dc
wire in perms, cleared many todos
richard-cox Jan 30, 2019
0bbc74b
Merge remote-tracking branch 'origin/invite-users' into invite-users-2
richard-cox Jan 31, 2019
d79cb13
WIP backend
nwmac Jan 31, 2019
292a79d
Merge remote-tracking branch 'origin/invite-users' into invite-users-2
richard-cox Jan 31, 2019
30b7396
Wire in request
richard-cox Jan 31, 2019
70f002f
Remove other steps, fix & tidy up
richard-cox Feb 1, 2019
66546a8
Fix dupe entries
richard-cox Feb 1, 2019
3602acf
Return + focus
richard-cox Feb 1, 2019
8a3d171
Tweaks
richard-cox Feb 4, 2019
1da601c
Tweaks
richard-cox Feb 4, 2019
a95f61e
Fix tests
richard-cox Feb 4, 2019
b9c1454
Merge remote-tracking branch 'origin/v2-master' into invite-users
richard-cox Feb 4, 2019
8585502
CC and lint fixes
richard-cox Feb 4, 2019
e9d53d9
Basic docs, test fixes
richard-cox Feb 4, 2019
4c909f7
MD lint fixes
richard-cox Feb 5, 2019
aece246
Only show invite configure button if cf admin, tweak message for non-…
richard-cox Feb 5, 2019
bc27492
Fix `other` suite e2e tests
richard-cox Feb 5, 2019
887aab0
Improve wait for users table
richard-cox Feb 5, 2019
42599f6
Fix backend test
richard-cox Feb 5, 2019
2944bc6
Fix unit test, allow more time for e2e loading users
richard-cox Feb 5, 2019
ad8eb90
Unit test tweak
richard-cox Feb 6, 2019
fa1855c
Doc fix, tweak for unit tests
richard-cox Feb 6, 2019
66219a7
To Revert - e2e debug
richard-cox Feb 6, 2019
adcc443
Revert "To Revert - e2e debug"
richard-cox Feb 7, 2019
8ceae43
Fix forever loading users list on systems with no smpt config
richard-cox Feb 7, 2019
0afc77e
CC Fixes
richard-cox Feb 7, 2019
501b77c
Add close option to config invite client snack bar
richard-cox Feb 7, 2019
e3fab3b
Add confirmation and error snackbar to disable user invite
richard-cox Feb 7, 2019
8551357
Check scopes and use token for creating user in CF
nwmac Feb 8, 2019
6cd885b
Merge remote-tracking branch 'origin/v2-master' into invite-users
nwmac Feb 12, 2019
93eead1
Update user invite to Echo V3 API
nwmac Feb 12, 2019
ca17c21
Unit test fix
nwmac Feb 12, 2019
086dcfe
Fix front-end unit test
nwmac Feb 12, 2019
9f72548
Add permission check
nwmac Feb 13, 2019
0b2ba30
Three changes
richard-cox Feb 12, 2019
cbf358f
Move invite users button to above user tables
richard-cox Feb 13, 2019
69c06a7
Fix doc readme cc warnings
richard-cox Feb 13, 2019
d442ee3
Minor tidy-ups
nwmac Feb 14, 2019
3fef4f6
Merge branch 'v2-master' into invite-users
KlapTrap Feb 15, 2019
40058aa
Fix imports
KlapTrap Feb 15, 2019
283b5a0
Update docs
KlapTrap Feb 15, 2019
159a5ef
Update the docs guide
KlapTrap Feb 18, 2019
db04bb3
Update invite users text
KlapTrap Feb 18, 2019
ecea0ad
Minor change to the invite table header
KlapTrap Feb 18, 2019
af6e698
Small text change
KlapTrap Feb 18, 2019
a55a88a
Minor text change
KlapTrap Feb 18, 2019
b108d71
Merge remote-tracking branch 'origin/v2-master' into invite-users
richard-cox Feb 18, 2019
73793bc
Merge fixes
richard-cox Feb 18, 2019
93d8719
Update fetch all users max pagination
richard-cox Feb 18, 2019
2090f70
CC Fixed and copy change
KlapTrap Feb 18, 2019
656e3ff
CC Fix
KlapTrap Feb 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Basic docs, test fixes
  • Loading branch information
richard-cox committed Feb 4, 2019
commit e9d53d9000958317c7882fa0b62649451a0bd720
46 changes: 46 additions & 0 deletions docs/invite-user-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Invite User Guide

Stratos provides a way for Cloud Foundry administrators, organization managers and space managers to invite users to an organization or space.

During the invite process
- A UAA and CF User will be created
- Initial roles will be assigned. User will be added as an organization member and if applicable a pre-selected space role.
- Users will be emailed a verification link. The link directs the user to a UAA site to set their password.
> Note - The user will not be able to log in without first setting their password, however CF admins, organization managers and space managers will still be able to set roles for the user

## Set up
There are number of set up steps to execute first.

1) Supply SMTP server details for Jetstream to use to send out verification email. This can be done via the usual environment variable
approach or in the dev world in the config.properties file. The config settings, with example values, are as follows

```
SMTP_FROM_ADDRESS=Stratos<test@test.com>
SMTP_HOST=127.0.0.1
SMTP_PASSWORD=
SMTP_PORT=1025
SMTP_USER=
TEMPLATE_DIR=./templates
```
> Note - In the dev world use [tophfr/mailcatcher](https://hub.docker.com/r/tophfr/mailcatcher/) in place of an actual SMTP server
> (`docker run -d -p 1025:25 1080:80 tophfr/mailcatcher ` will bring up image, access the UI via `http://localhost:1080` and use the `config.properties` from above)

2) Update the default email templates

Default templates are found, as per example configuration above, in `src/jetstream/templates`

3) Create/Locate a UAA client with required scopes

Stratos uses a pre-configured UAA client to invite the UAA user and create the CF user. In needs both `scim.invite` and `// TODO: UPDATE`
To manually create such a user using the UAA CLI the following command can be used
```
uaac client add stratos-invite --scope scim.invite `// TODO: UPDATE` --authorized_grant_types client_credentials --authorities scim.invite -s password
```
In the above example the client id is `stratos-invite` and client secret `password`

4) In Stratos set uaa client
1) Navigate to the Cloud Foundry Summary page of the required CF
2) Use the `Configure` button in the `User Invitation Support` section
3) Supply the client id and secret and click `Configure`

At this point CF administrators, organization managers and space managers should be able to invite a user via the Organization/Space Users table
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '../../../../test-framework/cloud-foundry-endpoint-service.helper';
import { testSCFGuid } from '../../../../test-framework/store-test-helper';
import { BooleanIndicatorComponent } from '../../boolean-indicator/boolean-indicator.component';
import { StackedInputActionComponent } from './stacked-input-action.component';
import { StackedInputActionComponent, StackedInputActionResult } from './stacked-input-action.component';

describe('StackedInputActionComponent', () => {
let component: StackedInputActionComponent;
Expand All @@ -29,7 +29,10 @@ describe('StackedInputActionComponent', () => {
beforeEach(() => {
fixture = TestBed.createComponent(StackedInputActionComponent);
component = fixture.componentInstance;
component.stateIn$ = observableOf(null);
component.stateIn$ = observableOf({
key: 'string',
result: StackedInputActionResult.OTHER_VALUES_UPDATED
});
fixture.detectChanges();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ describe('StackedInputActionsComponent', () => {
providers: [{
provide: ActiveRouteCfOrgSpace,
useFactory: () => new BaseCfOrgSpaceRouteMock(testSCFGuid)
}, ]
}]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(StackedInputActionsComponent);
component = fixture.componentInstance;
component.stateIn$ = observableOf(null);
component.stateIn$ = observableOf([]);
fixture.detectChanges();
});

Expand Down
2 changes: 1 addition & 1 deletion src/jetstream/default.config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ UI_PATH=../../dist


# User Invites
SMTP_FROM_ADDRESS=Stratos<test@test.com>
SMTP_FROM_ADDRESS=Stratos<invite@stratos.com>
SMTP_HOST=127.0.0.1
SMTP_PASSWORD=
SMTP_PORT=1025
Expand Down