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(api-server): allow no authorization on socketio endpoints #1925

Closed
outSH opened this issue Mar 14, 2022 · 0 comments · Fixed by #1926
Closed

fix(api-server): allow no authorization on socketio endpoints #1925

outSH opened this issue Mar 14, 2022 · 0 comments · Fixed by #1926
Assignees
Labels
API_Server bug Something isn't working

Comments

@outSH
Copy link
Contributor

outSH commented Mar 14, 2022

Describe the bug

AuthorizationProtocol.NONE is ignored for socketio endpoints, requests must always contain token which is problematic for tests.

To Reproduce
Run Besu connector as apiServer plugin and try use watchBlocks(), it will throw:

client/lib/transports/polling-xhr.js:231:10) {
      data: {
        message: 'no token provided',
        code: 'credentials_required',
        type: 'UnauthorizedError'
      }
    }

I will provide PR very soon.

@outSH outSH added the bug Something isn't working label Mar 14, 2022
outSH added a commit to outSH/cactus that referenced this issue Mar 14, 2022
authorizeSocket middleware will be installed only if
AuthorizationProtocol different than NONE was provided.

Closes:  hyperledger-cacti#1925
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this issue Mar 17, 2022
authorizeSocket middleware will be installed only if
AuthorizationProtocol different than NONE was provided.

Closes:  hyperledger-cacti#1925
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this issue Mar 17, 2022
authorizeSocket middleware will be installed only if
AuthorizationProtocol different than NONE was provided.

Closes:  hyperledger-cacti#1925
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
petermetz pushed a commit to outSH/cactus that referenced this issue Mar 21, 2022
authorizeSocket middleware will be installed only if
AuthorizationProtocol different than NONE was provided.

Closes:  hyperledger-cacti#1925
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
petermetz pushed a commit that referenced this issue Mar 21, 2022
authorizeSocket middleware will be installed only if
AuthorizationProtocol different than NONE was provided.

Closes:  #1925
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API_Server bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants