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 #1926

Merged
merged 1 commit into from
Mar 21, 2022

Conversation

outSH
Copy link
Contributor

@outSH outSH commented Mar 14, 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

Note

  • This change work on my other local branch (not PR ready yet).
  • This can be refactored, so that all authorization middleware creation would be handled by AuthorizerFactory.createMiddleware, but I didn't want to touch it without test coverage. I will probably introduce some tests with of socketio authorization as part of other PR, we can think about improvements then.

@outSH
Copy link
Contributor Author

outSH commented Mar 14, 2022

@petermetz @izuru0 @takeutak Please review

Copy link
Contributor

@izuru0 izuru0 left a comment

Choose a reason for hiding this comment

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

LGTM

@petermetz petermetz removed the request for review from jonathan-m-hamilton March 15, 2022 18:09
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@outSH LGTM

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 petermetz merged commit bf51960 into hyperledger-cacti:main Mar 21, 2022
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.

fix(api-server): allow no authorization on socketio endpoints
3 participants