-
Notifications
You must be signed in to change notification settings - Fork 138
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
Userendpoints #4876
Userendpoints #4876
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've quickly run through the code and added some comments, haven't started testing though.
One question I had, which effects a couple of the comments, what was the reasoning for User-endpoints have the option for user-invites disabled. They can't be shared by users or admins
?
I'm also actively started looking at the e2e failures, I believe these relate to the travis config or environment (they start to run fine locally)
src/frontend/packages/cloud-foundry/src/features/cf/user-invites/user-invite.service.ts
Outdated
Show resolved
Hide resolved
...s/endpoints/create-endpoint/create-endpoint-cf-step-1/create-endpoint-cf-step-1.component.ts
Outdated
Show resolved
Hide resolved
...ontend/packages/core/src/shared/components/list/list-types/endpoint/endpoint-list.helpers.ts
Outdated
Show resolved
Hide resolved
...ontend/packages/core/src/shared/components/list/list-types/endpoint/endpoint-list.helpers.ts
Outdated
Show resolved
Hide resolved
...ontend/packages/core/src/shared/components/list/list-types/endpoint/endpoint-list.helpers.ts
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #4876 +/- ##
===========================================
- Coverage 52.91% 29.08% -23.84%
===========================================
Files 1141 61 -1080
Lines 40149 4906 -35243
Branches 5122 0 -5122
===========================================
- Hits 21246 1427 -19819
+ Misses 18719 3264 -15455
- Partials 184 215 +31 |
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
- Added additional comments - Tidied up some parts - Display endpoint create directly rather than via custom component - Added new doc to website menu
All of these are unlreated to this pr, but given their size and ease of reproducing them adding them here
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
) Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
Signed-off-by: Thomas Quandt <[email protected]>
0f775c2
to
043140c
Compare
The feature lets users create endpoints if they have the "stratos.endpointadmin" scope.
Description
General Behaviour
User-endpoints have the option for user-invites disabled. They can't be shared by users or adminsBack-End
endpointMiddleware()
buildCNSIList()
registerEndpoints()
DoRegisterEndpoints()
unregisterCluster()
unregisterCluster(c echo.Context)
anddoUnregisterCluster(cnsiGUID string)
, so that cnsi can be unregistered without the need of anecho.Context
ListAdminEndpoints(userID string)
listCNSIByAPIEndpoint(apiEndpoint string)
GetCNSIRecordByEndpoint()
andcnsiRecordExists()
toGetAdminCNSIRecordByEndpoint()
andadminCNSIRecordExists()
to better reflect their function nowDoLoginToCNSI()
getInfo()
creator
from cnsi and replaces it with interface.CreatorInfoENABLE_USER_ENDPOINTS
todisabled
as defaultuserinvite/admin.goadded a check for creatoruserinvite/auth.goAddedcheckEndpointCreator()
Checks if admin-endpoint, otherwise don't allow invitesCreator
to several structsUserEndpointsEnabled
toPortalConfig
andInfo
OverwriteEndpoints
toRegisterEndpointParams
listCNSIsByCreator
sql query and belonging functionsfindCNSIByAPIEndpoint
listBy()
function because DRYpgsql_token.goAddedlistAuthToken
sql query and belonging functionsFront-End
CreatorInfo
interface to hold creator user data for cnsistratos.endpointadmin
as a scope that can be checked forUSER_ENDPOINTS_ENABLED
enableUserEndpoints
tointerface SessionDataConfig
Motivation and Context
Issue #4753
How Has This Been Tested?
OS: macOS Big Sur
Adjusted all unit tests with new model of endpoints (mock endpoints) so they don't fail.
Added back-end unit tests with this feature enabled for middleware, registering endpoints, connecting to endpoints and pgsql changes.
Manually tested:
Local minikube Kubernetes endpoints where used.
Docker image splatform/stratos-uaa used as UAA.
Added users and necessary scopes with uaac.
Types of changes
Checklist: