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 patsy authentication code #1837

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy-patsy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
steps:
- name: Deploy to Droplet
env:
DO_API_KEY: ${{ secrets.DO_API_KEY }}}
DO_API_KEY: ${{ secrets.DO_API_KEY }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This typo means the deployment would never actually succeed, since the droplet would fail to authenticate with the container registry.

In fact this bug has been here since the existence of the action! So we haven't actually been deploying any code changes for the last two months https://github.com/statechannels/go-nitro/blame/main/.github/workflows/deploy-patsy.yml#L44.

Changes to configuration were being deployed, which made this easier to miss.

To follow up, we need to make sure the github action fails when the registry auth fails.

SSH_PRIVATE_KEY: ${{ secrets.PATSY_SSH_PRIVATE_KEY }}
DROPLET_IP: "165.22.197.200"
NAME: "nitro-payment-proxy"
Expand Down
1 change: 1 addition & 0 deletions rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func processRequest[T serde.RequestPayload, U serde.ResponsePayload](rs *RpcServ
err = checkTokenValidity(rpcRequest.Params.AuthToken, permission, 7*24*time.Hour)
if err != nil {
response := serde.NewJsonRpcErrorResponse(rpcRequest.Id, serde.InvalidAuthTokenError)
rs.logger.Warn(serde.InvalidAuthTokenError.Message)
return marshalResponse(response)
}

Expand Down
Loading