-
Notifications
You must be signed in to change notification settings - Fork 72
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
[Feature]: CLI user can run cf create-space
successfully
#147
Comments
cf
CLI to manage organizations and spacescf create-space
Previously, CurrentUser[Name]() implementation was split in the config area for standard CF and CF-on-k8s. It would have been great to update the k8s version to call /whoami, but the cloud controller logic doesn't seem to belong in the config area. So instead, GetCurrentUser() has been added to the actor interface, and also to the AuthActor interface. This has a standard CF and a k8s CF implementation. The standard implementation just defers to the config method, whereas the k8s implementation invokes the new /whoami endpoint on the cloud controller. This commit also introduces handling that endpoint. Issue: cloudfoundry/korifi#147
Previously, CurrentUser[Name]() implementation was split in the config area for standard CF and CF-on-k8s. It would have been great to update the k8s version to call /whoami, but the cloud controller logic doesn't seem to belong in the config area. So instead, GetCurrentUser() has been added to the actor interface, and also to the AuthActor interface. This has a standard CF and a k8s CF implementation. The standard implementation just defers to the config method, whereas the k8s implementation invokes the new /whoami endpoint on the cloud controller. This commit also introduces handling that endpoint. Issue: cloudfoundry/korifi#147
See commit eirini-forks/cli@e5d4155 for the comment and changes. This has passing tests. The branch is I've changed the It also remains to build the /whoami endpoint in the API. |
Previously, CurrentUser[Name]() implementation was split in the config area for standard CF and CF-on-k8s. It would have been great to update the k8s version to call /whoami, but the cloud controller logic doesn't seem to belong in the config area. So instead, GetCurrentUser() has been added to the actor interface, and also to the AuthActor interface. This has a standard CF and a k8s CF implementation. The standard implementation just defers to the config method, whereas the k8s implementation invokes the new /whoami endpoint on the cloud controller. This commit also introduces handling that endpoint. Issue: cloudfoundry/korifi#147
This returns name and kind (i.e. User or ServiceAccount) for the given token or client certificate passed in the auth header. Required so the CF CLI can send the correct username in requests for automatic role creation. Issue: #147 Co-authored-by: Kieron Browne <[email protected]>
Issue: #147 Co-authored-by: Kieron Browne <[email protected]>
In cf-on-k8s, user username and guid will always be the same. We need to accept either in the create-role payload. Issue: #147 Co-authored-by: Kieron Browne <[email protected]>
PR in the CLI repo here: eirini-forks/cli#9 |
cf create-space
cf create-space
successfully
Previously, CurrentUser[Name]() implementation was split in the config area for standard CF and CF-on-k8s. It would have been great to update the k8s version to call /whoami, but the cloud controller logic doesn't seem to belong in the config area. So instead, GetCurrentUser() has been added to the actor interface, and also to the AuthActor interface. This has a standard CF and a k8s CF implementation. The standard implementation just defers to the config method, whereas the k8s implementation invokes the new /whoami endpoint on the cloud controller. This commit also introduces handling that endpoint. Issue: cloudfoundry/korifi#147
Previously, CurrentUser[Name]() implementation was split in the config area for standard CF and CF-on-k8s. It would have been great to update the k8s version to call /whoami, but the cloud controller logic doesn't seem to belong in the config area. So instead, GetCurrentUser() has been added to the actor interface, and also to the AuthActor interface. This has a standard CF and a k8s CF implementation. The standard implementation just defers to the config method, whereas the k8s implementation invokes the new /whoami endpoint on the cloud controller. This commit also introduces handling that endpoint. Issue: cloudfoundry/korifi#147 Co-authored-by: Giuseppe Capizzi <[email protected]> Co-authored-by: Danail Branekov <[email protected]> Co-authored-by: Giuseppe Capizzi <[email protected]>
This returns name and kind (i.e. User or ServiceAccount) for the given token or client certificate passed in the auth header. Required so the CF CLI can send the correct username in requests for automatic role creation. Issue: #147 Co-authored-by: Kieron Browne <[email protected]>
Issue: #147 Co-authored-by: Kieron Browne <[email protected]>
In cf-on-k8s, user username and guid will always be the same. We need to accept either in the create-role payload. Issue: #147 Co-authored-by: Kieron Browne <[email protected]>
This returns name and kind (i.e. User or ServiceAccount) for the given token or client certificate passed in the auth header. Required so the CF CLI can send the correct username in requests for automatic role creation. Issue: #147 Co-authored-by: Kieron Browne <[email protected]>
Issue: #147 Co-authored-by: Kieron Browne <[email protected]>
In cf-on-k8s, user username and guid will always be the same. We need to accept either in the create-role payload. Issue: #147 Co-authored-by: Kieron Browne <[email protected]>
Blockers/Dependencies
POST /v3/spaces
cf-k8s-api#61POST /v3/roles
#166POST /v3/roles
#160Background
As a developer
I want to create a space using the
cf
CLIAnd automatically become a
SpaceManager
andSpaceDeveloper
for the new spaceSo that I can manage apps in my space
Acceptance Criteria
GIVEN a
cf-k8s-api
instance existsAND an organization exists
AND I have targeted the org with
cf target -o <org-name>
WHEN I run
cf create-space <space-name>
AND
cf spaces
THEN I see the created space in the list
GIVEN a
cf-k8s-api
instance existsAND an organization exists
WHEN I run
cf create-space -o <org-name> <space-name>
AND
cf target -o <org-name>
AND
cf spaces
THEN I see the created space in the list
Dev Notes
OrgUser
,SpaceManager
andSpaceDeveloper
roles to the user creating the space. This will in turn need a valid username returned by theCurrentUser()
method inConfig
. This in turn will need a/whoami
enpoint. We have discussed these things here and here.The text was updated successfully, but these errors were encountered: