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

Admin servlet link not valid when configured orientdb for https #7

Closed
karolmie1 opened this issue Aug 2, 2017 · 6 comments
Closed
Labels

Comments

@karolmie1
Copy link

There is no auto-redirect, or direct link to https:// site when dropwizard is configured to run with https.
That of course causes ERR_INVALID_HTTP_RESPONSE.

It would be nice if this link changed automatically, depending on the configuration.

@xvik
Copy link
Owner

xvik commented Aug 2, 2017

Could you please show me configuration example so I could better understand what you mean?

@karolmie1
Copy link
Author

Ok, I've looked a lil bit closer.
If you use https for admin, then link will point to proper https orientdb address. The strange thing is that this address still is somehow "autoredirected" to http version. So, link shows https, but browser (FF, Chrome) on both Windows and Linux opens http version, and I still have to change address manually.

Even stranger: when I "copy link address", and paste it it goes to wrong url, but when I change url manually, and copy it again, then pasting it causes it to go to correct url.

But this is probably browser fault, and probably can't be fixed from here. In fact I'm gonna ask stackoverflow of this peculiar behavior.

Second scenario:
when orientdb is using https, while dropwizard is using http, link explicitly shows http version, but that's really uncommon configuration and I understand that it is not worth supporting.

Feel free to close.

@xvik
Copy link
Owner

xvik commented Aug 2, 2017

I will try to reproduce.

It's more likely that orient (it's http server part) do redirects itself. Probably this is due to musconfiguration.. need to look closer.
Please add stackoverflow link here too for reference.

@karolmie1
Copy link
Author

@xvik xvik added the bug label Aug 24, 2017
@xvik
Copy link
Owner

xvik commented Aug 24, 2017

Finally, I have looked the code and experiment.

/orient/studio call leads to temporary redirect (302) response to studio url. There should not be any connection between dropwizard https usage and studio url as they are different servers with different configs:

dropwizard config orient config studio url
http http http
https http http
https https https
http https https

There is a problem now that /orient/studio is always redirected to http studio url (doesn't count possible orient https configuration), so the last two cases (from the table above) will lead to incorrect http studio url redirect. I will fix that.

I was not able to reproduce ERR_INVALID_HTTP_RESPONSE browser error in case of /orient/studio https call (dropwizard admin https) being redirected to http studio url. But I don't see any reason to see such error. Probably, in your case, something else leads to that error (proxy or special ports used). Also, you mention strange behaviour when browser show https url and actual url is http, which should be possible only if something in the middle handles 302 redirect instead of the browser.

xvik added a commit that referenced this issue Aug 26, 2017
indicate configured ssl and https in orient servlet;
rewrite relative keystore paths in orient socket config (be able to configure keystore relatively to application)
@xvik
Copy link
Owner

xvik commented Sep 2, 2017

New version released with a lot of ssl related improvements

@xvik xvik closed this as completed Sep 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants