-
-
Notifications
You must be signed in to change notification settings - Fork 318
Description
Expected
should be able to push to main branch when branch feature is active
Actual
when and only when branch feature is active using structurizr/onpremises, pushing to main branch results in error
however, pushes to any other branches completed successfully
error is attached below
com.structurizr.api.StructurizrClientException: Authorization header doesn't match
com.structurizr.api.StructurizrClientException: com.structurizr.api.StructurizrClientException: Authorization header doesn't match
at com.structurizr.api.WorkspaceApiClient.putWorkspace(WorkspaceApiClient.java:351)
at com.structurizr.cli.PushCommand.run(PushCommand.java:147)
at com.structurizr.cli.StructurizrCliApplication.run(StructurizrCliApplication.java:83)
at com.structurizr.cli.StructurizrCliApplication.main(StructurizrCliApplication.java:104)
Caused by: com.structurizr.api.StructurizrClientException: Authorization header doesn't match
at com.structurizr.api.WorkspaceApiClient.putWorkspace(WorkspaceApiClient.java:346)
... 3 more
Steps to reproduce
tested on structurizr/onpremises using structurizr-cli (all latest)
push to main branch, whether using --branch parameter, or leave it default
Version/build information
latest
Severity
Critical
Priority
Low (I'm willing to make a pull request - please confirm approach first)
More information
i've debugged structurizr/onpremises and structurizr-cli, there is a bug on hmac validation, caused by path condition when "main" branch is selected
at some point, when we push to "main" branch, the client hashes path using "/api/workspace/{id}/branch/{id}"
but the internal validation in structurizr/onpremises is using "/api/workspace/{id}"
i post this issue in this repo, since the fix is highly probably to be implemented in this repo instead of the structurizr/onpremises