Closed Bug 1492666 Opened 6 years ago Closed 5 years ago

enable Auth0 sign-in for taskcluster-staging

Categories

(Taskcluster :: Services, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: hassan)

References

Details

Right now only manual login is enabled in staging; let's enable Auth0 logins as well for parity with production.
Depends on: 1494374
Per email, I'll request a staging Auth0 and a development Auth0. All of the development deployments can share the latter, just with different callback URLs. REQ0060747
No response yet -- I pinged in the servicenow site.
Depends on: 1502465
Depends on: 1503334
After some consultation, we're changing the plan a little here. Until tc-web is running in staging/dev, we'll just use manual logins. That will save the work of redeploying tc-login and hacking tools to work in that context (which wouldn't have been that much work anyway..). So this bug is now about supporting Auth0 sign-in in tc-web. We've got a bit of thinking to do before diving in on that.
Assignee: dustin → nobody
Component: Redeployability → Services
Blocks: 1451997

AJ, are there any updates since the login RRA meeting? If I recall from our last discussion, members of secops were going to inspect the login flow in tc-web-server. Thanks!

Flags: needinfo?(abahnken)

Hey Hassan,

I did a quick run through and it looks okay to me, except I have one question at the moment: How is revocation of the JWT handled?

As an example, say I logged in via Github, so the expiration of my JWT is forever (https://github.com/taskcluster/taskcluster/blob/1c62ce556178356581715a9f98223a7098cf9b9d/services/web-server/src/login/strategies/github.js#L89-L95) and then my laptop gets stolen. How do I (or the taskcluster team, etc) revoke that JWT so that it can no longer be used on my stolen laptop?

Flags: needinfo?(abahnken) → needinfo?(helfi92)

Along side this, I don't think that the expiration for JWT's (or any session tokens) should exceed ~30 days.

If your laptop gets stolen, we can remove your scopes from https://taskcluster-ui.herokuapp.com/auth/clients. The next thing I think you should do is revoke the session from that device using https://github.com/settings/security. Dustin, can you confirm?

Along side this, I don't think that the expiration for JWT's (or any session tokens) should exceed ~30 days.

We can adjust this to be 30 days.

Flags: needinfo?(helfi92) → needinfo?(dustin)

Hmm, now that you mention it, revoking the session as you describe wouldn't change anything -- that token is only used immediately after login to identify the user. The JWT is generated from there, and the GitHub API token discarded.

As I mentioned in the PR (but should have written here):

[T]he JWT just indicates identity, so if a GitHub user is removed from a team for example their access to roles related to that team will go away in 15 minutes (not 30 days) when the TC credentials from getCredentials expire and must be renewed.

so we're not totally in trouble.

Since this bug is about Auth0, and the topic here is GitHub, let's pop this out to a new bug? We can discuss possible solutions there.

Flags: needinfo?(dustin)

Since this bug is about Auth0, and the topic here is GitHub, let's pop this out to a new bug? We can discuss possible solutions there.

That sounds good.

This bug is likely almost done, then, although I was unable to login via auth0 just now, I think because its JWT secret config is not up-to-date. That will likely get fixed as we transition to the new helm-based deployment approach.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

I'm thinking of adding auth0 login at least for https://taskcluster-ui.herokuapp.com. I think I just need to ask the IAM team to add the new callbackUrl and it should work. Happy to wait if you think this is a bad idea.

Flags: needinfo?(dustin)

Sounds good to me!

Status: RESOLVED → REOPENED
Flags: needinfo?(dustin)
Resolution: FIXED → ---

This isn't blocking tc-cloudops anymore (but still not done per comment 13)

No longer blocks: tc-cloudops
Assignee: nobody → helfi92

(In reply to Dustin J. Mitchell [:dustin] (he/him) from comment #15)

This isn't blocking tc-cloudops anymore (but still not done per comment 13)

It turns out we can't send cookies from https://taskcluster-ui.herokuapp.com to https://taskcluster-web-server.herokuapp.com. From https://devcenter.heroku.com/articles/cookies-and-herokuapp-com:

herokuapp.com domain are prevented from setting cookies for *.herokuapp.com

Login works however on https://hassan.taskcluster-dev.net/ (try logging in with GitHub).

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.