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

Rework Auth Plugins to Support HTTP Auth #194

Merged
merged 1 commit into from
Aug 28, 2015

Conversation

DirectXMan12
Copy link
Member

This commit reworks auth plugins slightly to enable
support for HTTP authentication. By raising an
AuthenticationError, auth plugins can now return
HTTP responses to the upgrade request (such as 401).

Related to novnc/noVNC#522

This commit reworks auth plugins slightly to enable
support for HTTP authentication.  By raising an
AuthenticationError, auth plugins can now return
HTTP responses to the upgrade request (such as 401).

Related to novnc/noVNC#522
@DirectXMan12 DirectXMan12 force-pushed the feature/http-auth-plugins branch from c13ad47 to 1e2b5c2 Compare August 25, 2015 21:52
@DirectXMan12
Copy link
Member Author

@kanaka @samhed thoughts?

@DirectXMan12 DirectXMan12 added feature New feature or request python labels Aug 27, 2015
except auth.AuthenticationError:
ex = sys.exc_info()[1]
self.send_auth_error(ex)
raise

Copy link
Member

Choose a reason for hiding this comment

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

Seems like auth should be before token plugin. Reduces the ability for non-authorized connections to do a denial of service to the system by inducing disk or DB activity due to token authorization.

Copy link
Member Author

Choose a reason for hiding this comment

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

The issue is that currently, the authenticate method receives the decode host and port (that way you could say "person X is only authorized to connect to host/port Y"), so changing it would break backwards compatibility. Hmm...

Copy link
Member

Choose a reason for hiding this comment

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

Yes, you're right. I suppose if it becomes an issue, we could always add an optional early auth call that doesn't have the target resolved yet. And really, it's probably better to do authorization on the token. But having the target is useful for authorization in many cases. And truth be told, if the token->target information is on disk or in a DB, then user auth info probably is too. Anyways, it was really just a thought that came to me, I'm fine with the change as is.

@kanaka
Copy link
Member

kanaka commented Aug 27, 2015

One inline comment but otherwise looks fine to me.

DirectXMan12 added a commit that referenced this pull request Aug 28, 2015
Rework Auth Plugins to Support HTTP Auth
@DirectXMan12 DirectXMan12 merged commit 714aa34 into master Aug 28, 2015
@DirectXMan12 DirectXMan12 deleted the feature/http-auth-plugins branch August 28, 2015 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants