Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be able to "un-deny" an auth grant from the Manage Trusted Extensions UI #118486

Closed
eamodio opened this issue Mar 8, 2021 · 11 comments
Closed
Assignees
Labels
authentication Issues with the Authentication platform feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@eamodio
Copy link
Contributor

eamodio commented Mar 8, 2021

Currently if you choose to Deny and auth grant prompt, you can still see the extension (as unchecked) in the Manage Trusted Extensions UI (👍), but if you attempt to check it and save, nothing happens. And if you re-open that UI it will be un-checked again.

I think we should allow undoing the denial from that UI.

@RMacfarlane RMacfarlane added the feature-request Request for new features or functionality label May 6, 2021
@RMacfarlane RMacfarlane added this to the Backlog milestone May 6, 2021
@RMacfarlane RMacfarlane added the authentication Issues with the Authentication platform label May 13, 2021
@TylerLeonhardt
Copy link
Member

Looks like this was just a code bug. The intent was that this quick pick would allow you to check on/off which extensions you trust.

@kieferrm kieferrm modified the milestones: Backlog, June 2021 Jun 13, 2021
@rzhao271
Copy link
Contributor

I'm not familiar with that UI, and wasn't able to find it in the command palette. @TylerLeonhardt can you provide some verification steps?

@rzhao271 rzhao271 added verification-needed Verification of issue is requested verification-steps-needed Steps to verify are needed for verification labels Jun 29, 2021
@TylerLeonhardt
Copy link
Member

It's like:

  • Open vscode (it's easier with an empty data dir): code-insiders --user-data-dir='/tmp/foo' (on non-Windows or pick a diff path for Windows)
  • install copilot if you haven't
  • You might see something like this already (if not lmk):
    image
  • click it
  • deny
  • Manage trusted extensions
    image
  • copilot should be unchecked
  • check it
  • Ok
  • go back to manage trusted extensions and verify it's checked
  • ^ that's enough to verify but maybe try to see if copilot will make a suggestion anyway

@TylerLeonhardt TylerLeonhardt removed the verification-steps-needed Steps to verify are needed for verification label Jun 29, 2021
@lramos15 lramos15 added verified Verification succeeded verification-found Issue verification failed and removed verified Verification succeeded labels Jun 30, 2021
@lramos15
Copy link
Member

Maybe I did something wrong but if I deny every extension they all seem to work fine and all the git actions still work.

@lramos15 lramos15 reopened this Jun 30, 2021
@TylerLeonhardt
Copy link
Member

@lramos15 that's #104008

this issue is only talking about when you "un-deny" an extension from when you denied it in the "Grant access..." modal.

@TylerLeonhardt TylerLeonhardt removed the verification-found Issue verification failed label Jun 30, 2021
@lramos15
Copy link
Member

It still seems pretty broken to me, but I'll leave it up to someone else.
I created a new data dir, and then denied extensions and checked and unchecked them. Sometimes it was able to use my account without another allow dialog or me granting it a token. One point it said no extensions wanted to use my account when it wasn't true, but the check box state did update correctly which is what the verification steps asked for.

@TylerLeonhardt
Copy link
Member

Sometimes it was able to use my account without another allow dialog or me granting it a token.

In the case of the GitHub Pull Request extension, it basically logs in once and then maintains an Octokit object for all future GitHub API calls:
https://github.com/microsoft/vscode-pull-request-github/blob/c9911fffef4fa09330cdda57fc4d130af67636ac/src/github/credentials.ts#L170-L171

there isn't a mechanism, today at least, that would invalidate that access token that was given to the client. It will eventually expire and then calling getSession again will not give you a session if you have unchecked the check box. This is why the GHPR extension continues to work fine after you deny it... but once you reload, it will stop working (I wonder if this is something we should do... similar to Workspace Trust's model of reloading)

One point it said no extensions wanted to use my account when it wasn't true

Got some repro steps for this?

@lramos15
Copy link
Member

Got some repro steps for this?

Sorry I don't.
I clicked deny to git lens, github pr, codespaces, and copilot then toggled them back on and off a bunch in the trusted extensions quick pick. I then would try to execute something such as opening a repo with git lens and click deny again. This is when I saw that some extensions didn't care to ask me again and just used a token. I also tried to get back to the trusted extensions view and couldn't because it said no extensions wanted to use my account.

@TylerLeonhardt
Copy link
Member

I then would try to execute something such as opening a repo with git lens and click deny again.

How do I open a repo with GitLens? Also, I assume when you tried this, you already had GitLens denied, is that right?

@lramos15
Copy link
Member

I played around with it a bit more and I couldn't get it to repo again. I'll call this verified for now and test it out again once #104008 is fixed as I assume theres just some auth state issues going on.

@lramos15 lramos15 added the verified Verification succeeded label Jun 30, 2021
@TylerLeonhardt
Copy link
Member

Yeah as I think about it some more I think we may have to reload the window if auth is denied to ensure that an access token is no longer used. This would mean that #104008 would no longer make sense but we can continue this discussion there. Thanks for the feedback!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
authentication Issues with the Authentication platform feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants
@eamodio @TylerLeonhardt @RMacfarlane @lramos15 @kieferrm @rzhao271 and others