Closed Bug 1430801 Opened 8 years ago Closed 7 years ago

Check that the client creator resets expiry when resetting the access token

Categories

(Taskcluster :: UI, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: dustin)

Details

I suspect that right now we only reset the access token on a client, and don't extend its expiry. Thus we might reset an access token on an expired client.
Semi-related, I don't think the "Delete on Expiration" checkbox does what it says it does :)
It *should* work: handleResetAccessToken = async () => { this.setState({ loading: true }, async () => { try { const description = this.state.query.description || `Client created ${new Date()} for ${this.state.query.callback_url}`; const scopes = toArray(this.state.query.scope); await this.props.auth.updateClient(this.state.client.clientId, { description, expires: fromNow(this.state.query.expires || '3 days'), scopes: scopeIntersection(this.state.client.scopes, scopes), deleteOnExpiration: true }); const client = await this.props.auth.resetAccessToken( this.state.client.clientId ); I can see lots of clients that have not been deleted, though. In fact, the Auth service does not have the Scheduler add-on enabled. I wonder if that got deleted somehow??
I ran the purgeExpiredClients task. It needs a little attention to make sure it terminates, but it worked.
I can confirm the expiration and scopes are updated when "reset access token" is clicked.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Hm, maybe scopes aren't updated? dustin@jemison ~ $ ~/go/src/github.com/taskcluster/taskcluster-cli/taskcluster signin --scope 'auth:create-role:*' --scope 'auth:update-role:*' ... dustin@jemison ~ $ ~/go/src/github.com/taskcluster/taskcluster-cli/taskcluster signin ... left me with a client with the first set of scopes. Maybe it's limiting scopes to the client's current scopes?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Component: Tools → UI and Tools
You need to log in before you can comment on or make changes to this bug.