Skip to content

Comments

super admin login to any team it owns#4273

Merged
jamieklassen merged 3 commits intomasterfrom
super-admin-login-any-team
Aug 27, 2019
Merged

super admin login to any team it owns#4273
jamieklassen merged 3 commits intomasterfrom
super-admin-login-any-team

Conversation

@zoetian
Copy link
Contributor

@zoetian zoetian commented Aug 12, 2019

fixes: #4240

which allows super admin users to login to any team it doesn't on with fly command. fly -t target -n team -u username -p password.

@zoetian zoetian changed the title Super admin login any team [WIP] Super admin login any team Aug 12, 2019
@zoetian zoetian force-pushed the super-admin-login-any-team branch 2 times, most recently from 3fed22d to e9f1ec4 Compare August 13, 2019 15:45
@zoetian zoetian changed the title [WIP] Super admin login any team super admin login to any team it owns Aug 13, 2019
@zoetian zoetian force-pushed the super-admin-login-any-team branch from e9f1ec4 to ce79e18 Compare August 13, 2019 21:39
@zoetian zoetian requested review from a team August 13, 2019 21:39
@clarafu clarafu requested a review from jwntrs August 14, 2019 13:56
@pivotal-bin-ju pivotal-bin-ju force-pushed the super-admin-login-any-team branch from b147cf4 to f94e44f Compare August 14, 2019 19:32
@YoussB YoussB force-pushed the super-admin-login-any-team branch 2 times, most recently from 54ee00a to 2c929e0 Compare August 20, 2019 13:18
@jamieklassen
Copy link
Member

If this doesn't depend on #4238, I think it should be rebased without that
history -- I don't feel totally comfortable executing the cherry-pick
operation described here. However, it looks like the dependent PR will be merged
shortly so I'll just wait until that one is merged to review this one.

@zoetian zoetian force-pushed the super-admin-login-any-team branch 4 times, most recently from 45ebf8a to 2acb457 Compare August 20, 2019 17:55
Signed-off-by: Zoe Tian <[email protected]>
Signed-off-by: Taylor Silva <[email protected]>
Co-authored-by: Bishoy Youssef <[email protected]>
Co-authored-by: Bin Ju <[email protected]>
@zoetian zoetian force-pushed the super-admin-login-any-team branch from 2acb457 to eac0890 Compare August 20, 2019 19:31
@zoetian zoetian requested a review from jamieklassen August 20, 2019 19:35
@zoetian
Copy link
Contributor Author

zoetian commented Aug 20, 2019

Hello, this PR is ready for review

@jamieklassen jamieklassen self-assigned this Aug 21, 2019
@jamieklassen
Copy link
Member

while reviewing this PR, I haven been experimenting with accessing a
v3.14.1 cluster with this version of fly, to try to get more insight into this
snippet:

func unmarshalToken(tokenValue string) (map[string]interface{}, error) {
	tokenContents := strings.Split(tokenValue, ".")
	if len(tokenContents) < 2 {
		// this is really bad and makes it hard to write proper integration tests
		return nil, nil
	}

I hope to finish this experiment tomorrow.

@YoussB YoussB changed the title super admin login to any team it owns [WIP] super admin login to any team it owns Aug 21, 2019
Signed-off-by: Bishoy Youssef <[email protected]>
Co-authored-by: Taylor Silva <[email protected]>
@zoetian zoetian force-pushed the super-admin-login-any-team branch 3 times, most recently from c10447b to 0a20568 Compare August 26, 2019 16:22
@zoetian zoetian changed the title [WIP] super admin login to any team it owns super admin login to any team it owns Aug 26, 2019
@zoetian zoetian force-pushed the super-admin-login-any-team branch 3 times, most recently from 784e975 to f0bc913 Compare August 26, 2019 17:50
Unit tests for the API give us enough coverage

Signed-off-by: Zoe Tian <[email protected]>
Co-authored-by: Taylor Silva <[email protected]>
@zoetian zoetian force-pushed the super-admin-login-any-team branch from 1f1c9bf to 3ab02cc Compare August 26, 2019 20:00
@jamieklassen jamieklassen added this to the v5.5.0 milestone Aug 26, 2019
@zoetian zoetian requested a review from jamieklassen August 26, 2019 20:26
@taylorsilva
Copy link
Member

taylorsilva commented Aug 27, 2019

We got rid of the testflight tests we were adding because it does not provide any new coverage. Everything it tested is already covered by the API unit tests or the fly integration tests.

In order to break the testflight tests we added we would have to do one of the following:

  1. break fly, but any breaks would be caught by fly/integration
  2. break the API, but the unit tests would catch any breaks there

Therefore we're already covered by existing tests and don't need the new testflight tests.

This is ready for review again @pivotal-jamie-klassen

@jamieklassen jamieklassen merged commit 90b8bc0 into master Aug 27, 2019
@jamieklassen jamieklassen deleted the super-admin-login-any-team branch August 27, 2019 15:04
@jamieklassen jamieklassen added the release/documented Documentation and release notes have been updated. label Aug 29, 2019
jamieklassen pushed a commit that referenced this pull request Aug 29, 2019
#4273

Signed-off-by: Jamie Klassen <[email protected]>
Co-authored-by: James Thomson <[email protected]>
matthewpereira pushed a commit that referenced this pull request Sep 5, 2019
#4273

Signed-off-by: Jamie Klassen <[email protected]>
Co-authored-by: James Thomson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/documented Documentation and release notes have been updated.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fly] Super admin can log into any team

4 participants