Conversation
|
I'd very much like to have any approach towards identifying local token expiration.
The last approach changing the API for the storage format (#1464) is now stale for almost a year. The |
b467d37 to
482a1ea
Compare
|
Some major caveat found while trying to prototype a "username@expiration" approach: Some storage back ends may also be thrown off by the changing username… Relative time in protocol additionally indicates this is to be used as a transient element. For now I'd definitely favor using structured token detection (transparent, backward-compatible, non-intrusive). |
482a1ea to
c8a7e32
Compare
e7d3dc2 to
d7e4f76
Compare
|
@mjcheetham @mpysson can you please take a look at this change? It's already been iterated upon. |
|
@mjcheetham @mpysson there've been no changes in this project for 5 months. Can I co-maintain it? Not sure if I can do it long term but I promise to go through the currently open pull requests at the very least. Better than nothing. |
|
any updates on this push? |
@itsjustnickdev cautiously: yes. I opened #2059. However, during the extended time of ownership limbo, Git Credential Manager's release process has withered to the point where no releases can be made as of time of writing (notarizing, for example, is broken, yet it is required for Git Credential Manager to work on macOS). Therefore, the primary concern right now is to get that release process into a healthy shape. If you want to look into #2059 in the meantime, that would be really cool, of course! |
mjcheetham
left a comment
There was a problem hiding this comment.
What do you think about the merits of using the JsonWebToken type from the https://www.nuget.org/packages/Microsoft.IdentityModel.JsonWebTokens package?
d7e4f76 to
2efb138
Compare
|
@mjcheetham replaced handling of JWT with a generic StructuredToken placeholder. This should make expanding support (or replace implementation) fairly easily later on. |
|
If I know how this needs to be improved, I may have a chance to get it done in time for the next release. 😅 |
|
@mjcheetham I'd prefer to apply the (optional) switch to a "proper Identity library" at a later date. The update to In the current (revised) approach, changes to internal code should not require additional adjustments. |
2efb138 to
d86234f
Compare
|
Latest update in main massively reduced required adjustments to Moved update to |
d86234f to
32dae46
Compare
|
Revised code flow in |
|
What is preventing this from being merged? The issue has existed for FIVE YEARS. |
32dae46 to
db20a7b
Compare
|
Removed the expiration check from the This should never cause issues in the proper single well-behaved client case. If an update to a |
|
Let's get this merged! |
|
So @mjcheetham @dscho is there anything to be done here for a merge? As mentioned, it is not a conflict but may be more of a requirement to implement #2058 and #2059:
Alternative would be to assume the password is a token based on the existence of a refresh_token. Consistent triggers based on username require changes down to the credential storage layer. |
db20a7b to
9649df6
Compare
|
New approach for
|
9649df6 to
36e045a
Compare
|
Updated |
36e045a to
c2112c9
Compare
|
Will this get merged? |
add generic Token interface for type/value/expiration decode generic token data to internally known types add minimal JsonWebToken reader to decode and extract data
c2112c9 to
98ec129
Compare
add token expiry check for credential `password` value use token value in GitResponse content mark expiring token as 'ephemeral' data in GitResponse
98ec129 to
fc2d55c
Compare
|
New iteration with some new features and restructure:
@mjcheetham with the latest change, it would be sufficient to replace the code in Token.cs with and adding a dedicated full-blown library to the dependencies. I'd however still prefer a minimal bundled solution to a 500kB dependency with tons of unused features. |
Detect JWT token data in credential secret
Refresh expired tokens to avoid fail on fetch/push after expiration
Fixes #268
Fixes #1408
Fixes #1784