Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Add User Info to created tasks #303

Merged
9 commits merged into from
Nov 13, 2020
Merged

Conversation

bmc-msft
Copy link
Contributor

This PR makes user information from JWT tokens available as part of a Task.

Included changes:

  • Renamed verify_token to call_if_agent, since this function is specific to agent token verification
  • Renames is_authorized to is_agent, since this function checks if the token is an agent
  • Adds support for unmanaged nodes in is_agent (see start work towards enabling launching fuzzing within docker #133 for information)
  • Saves the user information from the JWT token on task create as part of TaskConfig

Note, TaskConfig is what is provided to notification templates. This enables Github issues and ADO work items to tie back to the user that created the task.

Note, while upn usually means email for AAD user tokens. If we were going to make use of the email address, we should perform a graph lookup based on the oid, but we're not.

@ghost
Copy link

ghost commented Nov 12, 2020

Hello @bmc-msft!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 18 hours, a condition that will be fulfilled in about 10 hours 41 minutes. No worries though, I will be back when the time is right! 😉

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost
Copy link

ghost commented Nov 13, 2020

Apologies, while this PR appears ready to be merged, it looks like main is a protected branch and I have not been granted permission to perform the merge.

1 similar comment
@ghost
Copy link

ghost commented Nov 13, 2020

Apologies, while this PR appears ready to be merged, it looks like main is a protected branch and I have not been granted permission to perform the merge.

@ghost ghost merged commit beea318 into microsoft:main Nov 13, 2020
@bmc-msft bmc-msft deleted the split-out-jwt-parsing branch November 13, 2020 11:51
ghost pushed a commit that referenced this pull request Nov 20, 2020
This adds information about the user that created a job or repro VM to the respective resources.

This expands on the addition made to tasks in #303.
@ghost ghost locked as resolved and limited conversation to collaborators Apr 17, 2021
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants