Skip to content
This repository has been archived by the owner on Feb 22, 2025. It is now read-only.

Can't create Full Scope PAT #481

Open
JerrickLewis7190 opened this issue Feb 28, 2022 · 13 comments
Open

Can't create Full Scope PAT #481

JerrickLewis7190 opened this issue Feb 28, 2022 · 13 comments

Comments

@JerrickLewis7190
Copy link

My org is cracking down on fullscoped pats where they're not allowed to be created anymore. Can you add in the functionality to create partial scope pat?

getAuthenticationInfoAsync failed

java.lang.Error: java.io.IOException: HTTP request failed with code 400: {"$id":"1","innerException":null,"message":"FullScopePatPolicyViolation","typeName":"Microsoft.VisualStudio.Services.DelegatedAuthorization.SessionTokenCreateException, Microsoft.VisualStudio.Services.WebApi, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","typeKey":"SessionTokenCreateException","errorCode":0,"eventId":3000}

@JerrickLewis7190
Copy link
Author

JerrickLewis7190 commented Mar 22, 2022

Hello, I was wondering if there are any changes on this. I think it might be a good idea to allow the users to set whatever token they want to use. @ForNeVeR could I add this a requested feature?

@JerrickLewis7190
Copy link
Author

I made the change. Can anyone give me access to create a branch?

@haven2world
Copy link

Any updates? I'm experiencing the same. Looks like the plugin hasn't been updated in one year.

@haven2world
Copy link

@JerrickLewis7190 Maybe you can fork this repo and create a PR back?

@morfj
Copy link

morfj commented Aug 18, 2022

Hoping for a fix soon here too!

@YuiTH
Copy link

YuiTH commented Mar 20, 2023

Bumping up. This feature also breaks the private Nuget feed.
It makes this plugin basically unusable in MSFT...

@reza-repo
Copy link

@JerrickLewis7190 did you ever create a PR?

@alexcrownus
Copy link

This is a major blocker.

@connorjs
Copy link

This seems to be the issue with the most up-votes.

I also hit this exception using Rider. I saw FullScopePatPolicyViolation mentioned, which may relate to my organization's rules around generating "full scope" PATs.

As @JerrickLewis7190 suggested, providing an option (config file, reading an environment variable, UI implementation) to enter a given PAT (the token itself) would solve this. The documentation can detail what permissions that PAT should have (I doubt it needs full; I expect it to need things to pull/push to repos, comment on PRs, and similar).


Is there a recommendation from the plugin owners on how we can contribute this fix? It relates to security, so I want to understand if any additional contributing requirements outside of those documented in the README.

@connorjs
Copy link

Note: I went through related issues and redirected them to this one given, at time of writing, this had the most up votes. Let's focus the discussion here.

@connorjs
Copy link

@ForNeVeR - Do you see any concerns with the community submitting a PR to allow user-provided token instead of whatever existing auth flow exists? I prefer to get maintainer blessing for security-related things before diving into solutions.

@ForNeVeR
Copy link
Collaborator

ForNeVeR commented Nov 30, 2024

I do not have any concerns about such a contribution. Just make sure there's some setting/checkbox in a user-visible place, and use IntelliJ ways of storing the passwords (PasswordSafe).

It will be tested and merged if it works well.

@jatin-code777
Copy link

@connorjs Thanks for taking this, please do check this PR: #574
I believe there were testing concerns there. Perhaps we could have a "setting/checkbox" to enable requesting PATs with only the required scopes?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants