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)
Taskcluster
UI
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.
Comment 1•8 years ago
|
||
Semi-related, I don't think the "Delete on Expiration" checkbox does what it says it does :)
| Assignee | ||
Comment 2•7 years ago
|
||
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??
| Assignee | ||
Comment 3•7 years ago
|
||
I ran the purgeExpiredClients task. It needs a little attention to make sure it terminates, but it worked.
| Assignee | ||
Comment 4•7 years ago
|
||
I can confirm the expiration and scopes are updated when "reset access token" is clicked.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 5•7 years ago
|
||
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 → ---
| Assignee | ||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Commit pushed to master at https://github.com/taskcluster/taskcluster-tools
https://github.com/taskcluster/taskcluster-tools/commit/d4ea63f24b0bf6c84d14733d2515167fd2bdc900
Bug 1430801 - intersect requested scopes with current scopes
| Assignee | ||
Updated•7 years ago
|
Status: REOPENED → RESOLVED
Closed: 7 years ago → 7 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: Tools → UI and Tools
You need to log in
before you can comment on or make changes to this bug.
Description
•