Skip to content

log expired tokens#6498

Merged
kcondon merged 1 commit intodevelopfrom
6495-log_expired_tokens
Jan 10, 2020
Merged

log expired tokens#6498
kcondon merged 1 commit intodevelopfrom
6495-log_expired_tokens

Conversation

@pameyer
Copy link
Contributor

@pameyer pameyer commented Jan 9, 2020

What this PR does / why we need it:
Allow sysadmins to log access from expired API tokens.

Which issue(s) this PR closes:

Closes #6495

Special notes for your reviewer:

Suggestions on how to test this:
curl -i -H "X-Dataverse-key: $valid_token" -X GET "http://localhost:8084/api/dataverses/:root" ; edit database to set expiration date to past, repeat curl call ; check system.log

Does this PR introduce a user interface change?:
no

Is there a release notes update needed for this change?:
no

Additional documentation:

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0003%) to 19.504% when pulling 4bc8fda on 6495-log_expired_tokens into af4c0b0 on develop.

@kcondon kcondon self-assigned this Jan 10, 2020
@kcondon
Copy link
Contributor

kcondon commented Jan 10, 2020

@pameyer This works for an expired token but not an invalid one, which is the other case mentioned in your ticket. Correction: your ticket title mentions both invalid and expired but your use case in the ticket specifically mentions expired due to long running jobs. Closing.

@kcondon kcondon merged commit fcf5292 into develop Jan 10, 2020
@kcondon kcondon deleted the 6495-log_expired_tokens branch January 10, 2020 21:56
@pameyer
Copy link
Contributor Author

pameyer commented Jan 10, 2020

@kcondon Good catch - I should've done a better job with the title.

@djbrooke djbrooke added this to the 4.19 milestone Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

As a dataverse operator, I'd like API access from expired / invalid tokens to be logged so that it can be monitored

5 participants