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

JWT follow-up #1562

Merged
merged 1 commit into from Oct 6, 2023
Merged

JWT follow-up #1562

merged 1 commit into from Oct 6, 2023

Conversation

roshii
Copy link
Contributor

@roshii roshii commented Sep 29, 2023

@roshii
Copy link
Contributor Author

roshii commented Sep 30, 2023

squashed

@AdamISZ
Copy link
Member

AdamISZ commented Oct 1, 2023

Thanks.

So about the async part, I'm not sure, but I guess this arose because you are using the async syntax and not the twisted stuff, but were calling a inlineCallbacks decorated twisted-style async function (do_request) which returned a Deferred with yield, right? I mean I guess it doesn't matter that much, if it works it's fine, but at some point we'd need to probably rewrite the whole codebase with async and not twisted (that would be a lot of work, to put it mildly!), but otherwise mixing them probably just makes it harder.

Again, I have no objections, if it works it works. It's only in the test part.

About the base64, I see the point about spaces and how that mismatched with the token code. Can I assume that there is no conflict with using base64 encoding here and anywhere else we refer to the wallet name? I believe from reading that you're only using it for the token-related usage of the wallet name.

(I actually personally think filenames with spaces should not ever be allowed).

@roshii
Copy link
Contributor Author

roshii commented Oct 1, 2023

So about the async part, I'm not sure, but I guess this arose because you are using the async syntax and not the twisted stuff, but were calling a inlineCallbacks decorated twisted-style async function (do_request) which returned a Deferred with yield, right? I mean I guess it doesn't matter that much, if it works it's fine, but at some point we'd need to probably rewrite the whole codebase with async and not twisted (that would be a lot of work, to put it mildly!), but otherwise mixing them probably just makes it harder.

Same guess. I did assume we could do a smooth transition to async syntax but it looks like it will need to be done in one go. It was then easier to switch back to inlineCallbacks for this fix and now that I know async syntax is not only a personal preference, I may look into syntax migration rather sooner than later.

About the base64, I see the point about spaces and how that mismatched with the token code. Can I assume that there is no conflict with using base64 encoding here and anywhere else we refer to the wallet name? I believe from reading that you're only using it for the token-related usage of the wallet name.

(I actually personally think filenames with spaces should not ever be allowed).

base64 encoded wallet names are only used in token scopes (as a JWTTokenAuthority property and in issued token), its character set matching name-scope-syntax. It complicates debugging but allows to cope with filenames containing spaces (which I personally "disfavor" but understand).

@AdamISZ
Copy link
Member

AdamISZ commented Oct 6, 2023

Needs rebase (presumably #1484 ) but after that, is there any blocker here or should we just merge?

@roshii
Copy link
Contributor Author

roshii commented Oct 6, 2023

rebased. i cannot think of any blockers, ready to merge as far as i can tell.

@kristapsk
Copy link
Member

Agree we should just merge this, @theborakompanioni will let us now if there are problems.

@roshii
Copy link
Contributor Author

roshii commented Oct 6, 2023

addressed review comment

@kristapsk kristapsk merged commit 28c8413 into JoinMarket-Org:master Oct 6, 2023
20 checks passed
@roshii roshii deleted the jwt-followup branch October 6, 2023 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants