3 ms·
Interesting. I can get the "pypi.org" domain from the base64-encoded part, however I don't see anything about revocation in the paper. Your reporting endpoint
by remram 6y ago
Interesting. I can get the "pypi.org" domain from the base64-encoded part, however I don't see anything about revocation in the paper.
Your reporting endpoint seems protected by a secret key that GitHub holds. Any reason PyPI can't accept anonymous submission of compromised tokens? If I find a PyPI token on my own server, can I not post it to https://pypi.org/_/github/disclose-token https://pypi.org/_/github/disclose-token without getting a key from you first?
- woodruffw 6y ago> I don't see anything about revocation in the paper. I don't believe it's something standardized or considered by the original whitepaper. Macaroons have the ability to contain arbitrary data, however, so it wouldn't be difficult to add revocation information to them. > If I find a PyPI token on my own server, can I not post it to https://pypi.org/_/github/disclose-token https://pypi.org/_/github/disclose-token without getting a key from you first? I wasn't part of the design, but my first thought goes to preventing the endpoint's use as an oracle: after a compromise, a malicious agent might find it useful to have an unlimited endpoint to test their stolen credentials against. Restricting use to a limited set of trusted entities avoids that.
- remram 6y agoDon't every other endpoints work as the oracle you describe? Are you worried about rate-limiting specifically? Also, the endpoint sends a 204 with no information about the validity of tokens, making it not much of an oracle. I think the payload is processed in the background too, preventing timing attacks.
- woodruffw 6y ago> Don't every other endpoints work as the oracle you describe? Are you worried about rate-limiting specifically? Rate-limiting was just the easy example. Other endpoints are subject to additional constraints: tokens don't directly carry their user information (IIRC), so someone with a collection of stolen tokens may not know which projects they can control. Similarly, tokens are scoped, so "create a new project" isn't an ability that an arbitrary token can necessarily do to gain more information about its rightful owner. Like I said, I don't know too much about the actual design decisions for that endpoint! That was an educated guess, based on what I might have done.
- devman0 6y agoI don't think allowing revocation of a token by any bearer of the token is much of a security issue. Consider a real world example, if one finds a credit card someone dropped on the street it can be reported as lost and revoked by the issuer even though the reporter is not the owner. As for the endpoint being an oracle, the endpoint doesn't really need to respond to the reporting client other than the revocation request has been received.
- woodruffw 6y ago> I don't think allowing revocation of a token by any bearer of the token is much of a security issue. Consider a real world example, if one finds a credit card someone dropped on the street it can be reported as lost and revoked by the issuer even though the reporter is not the owner. Whether or not it's a security issue depends on how the token is being used. Allowing potentially arbitrary parties to revoke tokens right before, say, a critical security release feels like a potential issue to me. Then again, I suppose they could do that by proxy by just publishing it on GitHub and letting the secret scanner do the work. Long story short: I'm idly speculating. For all I know, they did it because allowing arbitrary parties to report leaked secrets would result in unacceptably high FP rates. I wasn't privy to the decision.
- remram 6y ago> Allowing potentially arbitrary parties to revoke tokens right before, say, a critical security release feels like a potential issue to me If the third-party has the token, they can make releases *adding* critical security issues.