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

Fix message parsing in nats resolver account deletion handling #6427

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aricart
Copy link
Member

@aricart aricart commented Jan 29, 2025

Added a call to c.msgParts for proper parsing of message contents in the account deletion request handler. Tests pass without this change, but an actual call of the API will always fail to parse the request JWT because the delete function only expects the JWT portion:

NATS/1.0
Nats-Request-Info: {"acc":"AA3SRJHT6PP52IJG26AXNSA7DYOCOZCWZARDOPVLMPGV45QBKRLGEVNW","rtt":899875,"server":"NBK7H52ED2O6XYMB5E6YTQIZPVKCF6BQN4G7XDEZ3GPGJU25K3DDTEQN"}

eyJ0eXAiOiJKV1QiLCJhbGciOiJlZDI1NT......

Note that since this feature doesn't currently work, it means that it is not used, and I am not sure what the wisdom is on deleting accounts from the resolver, so possibly OK to leave as is.

Signed-off-by: alberto [email protected]

Added a call to `c.msgParts` for proper parsing of message contents in the account deletion request handler. Tests pass without this change, but an actual call of the API will always fail to parse the request JWT because the delete function only expects the JWT portion:

```
NATS/1.0
Nats-Request-Info: {"acc":"AA3SRJHT6PP52IJG26AXNSA7DYOCOZCWZARDOPVLMPGV45QBKRLGEVNW","rtt":899875,"server":"NBK7H52ED2O6XYMB5E6YTQIZPVKCF6BQN4G7XDEZ3GPGJU25K3DDTEQN"}

eyJ0eXAiOiJKV1QiLCJhbGciOiJlZDI1NTE5LW5rZXkifQ.eyJqdGkiOiJTVUQ1VVY1T1ZERDJUSDJaSUNIWU5LTlNUWFZESk1IT0E2Q1ZUWldXTklFT0UyVlhLVEdRIiwiaWF0IjoxNzM4MTcxNTk3LCJpc3MiOiJPQUZNWVVYMk83RjZVTzNITUtOV0ozMzdDNEtWT1BLNFVKQ0gyWUtPR042NDVHWlVRRVc2WVZIRCIsInN1YiI6Ik9BRk1ZVVgyTzdGNlVPM0hNS05XSjMzN0M0S1ZPUEs0VUpDSDJZS09HTjY0NUdaVVFFVzZZVkhEIiwibmF0cyI6eyJhY2NvdW50cyI6WyJBRE1BQ1QzNks0Uk41RDI2R0tKUUpOVEdDUEpVVEhPRU9TSEtITVBZTko1RDRLVFZWSlVBVlNJWiJdLCJ2ZXJzaW9uIjoyfX0.7G8PEXRIdPbN9pyjUorrngbnKTjzMATy9eL7u8f62zAECPZgIs4c2xDeA8nKgW1yRKFfdWBL872W8d8YmdJGDg
```

Signed-off-by: Alberto Ricart <[email protected]>
@neilalexander
Copy link
Member

Is this PR ready for review?

@aricart aricart marked this pull request as ready for review January 30, 2025 15:39
@aricart aricart requested a review from a team as a code owner January 30, 2025 15:40
@aricart
Copy link
Member Author

aricart commented Jan 30, 2025

Is this PR ready for review?

yes - was waiting for travis to pass the tests.

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.

2 participants