Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Redirects to IP address when domain is used in address bar #226

Closed
gigawhitlocks opened this issue Dec 1, 2017 · 9 comments
Closed

Redirects to IP address when domain is used in address bar #226

gigawhitlocks opened this issue Dec 1, 2017 · 9 comments

Comments

@gigawhitlocks
Copy link

I have installed Admiral through the VIC 1.3 RC2 OVA and provided custom certificates that are assigned to vch.theknown.net, a domain that I control. This domain resolves to the private IP on which I have installed the OVA. When I click on the admin portal, I'm redirected instead to https://private_ip/ and, thus, receive a certificate warning.

There should be a way for me to change the base url of links referencing Admiral to use the domain name being accessed if that behavior cannot be detected, and in any case, I should be able to access Admiral at vch.theknown.net:8282 if I specify that in my browser without being redirected to IP_ADDRESS:8282

@gigawhitlocks
Copy link
Author

Also if I try to manually change the IP address to the domain name, I get this glorious response:

screen shot 2017-12-01 at 4 56 13 pm

Uh, lol, no. That's not good.

@andrewtchin
Copy link

After Ian set the FQDN in the vApp settings the config was updated but after the SSO login, he was redirected back to the IP.

Based on this https://github.com/vmware/vic-product/pull/1066/files
We should be setting the hostname everywhere except for the below, but I'm not sure what that is used for:

# put admiral endpoint in guestinfo                                                                  
$script_dir/set_guestinfo.sh admiral.endpoint https://"$ip_address":"$ADMIRAL_PORT" 

Any ideas on if we need to set something else @sergiosagu @morris-jason ?

@sergiosagu
Copy link
Contributor

@andrewtchin - I think that the problem comes from the value that the parameter --publicUri may get within the start script: https://github.com/vmware/vic-product/blob/master/installer/build/scripts/admiral/start_admiral.sh

That parameter should be the FQDN specified during the OVA installation, if any.

You can leave this issue in this repo if you want, but it's more an OVA install/config issue.

@ghost
Copy link

ghost commented Dec 4, 2017

@sergiosagu the publicUrl is being set as expected - (this is a naming problem. We call it OVA_VM_IP but it actually is a hostname if available, set by configure_admiral.)
The command being run by systemd is:

/usr/bin/docker run -p 8282:8282 
--name vic-admiral 
-v /storage/data/admiral:/var/admiral 
-v /storage/data/admiral/configs:/configs 
-v /storage/log/admiral:/admiral/log 
-v /etc/vmware/admiral/logging-vic.properties:/config/logging.properties 
-e ADMIRAL_PORT=-1 

-e JAVA_OPTS=-Ddcp.net.ssl.trustStore=/configs/trustedcertificates.jks -Ddcp.net.ssl.trustStorePassword=changeit -Dencryption.key.file=/var/admiral/8282/encryption.key -Dinit.encryption.key.file=true -e CONFIG_FILE_PATH=/configs/config.properties 

-e XENON_OPTS=--publicUri=https://vch.theknown.net:8282/ --bindAddress=0.0.0.0 --port=-1 --authConfig=/configs/psc-config.properties --securePort=8282 --keyFile=/configs/server.key --certificateFile=/configs/server.crt --startMockHostAdapterInstance=false 

--log-driver=json-file --log-opt max-size=1g --log-opt max-file=10 vmware/admiral:vic_v1.3.0-rc2

Disregard obvious issues of spacing and quoting - I edited the command to make it look better for github output.

@ghost
Copy link

ghost commented Dec 4, 2017

In fact, the problem seems to be:

cat /storage/data/admiral/configs/psc-config.properties
#Fri Dec 01 22:34:09 UTC 2017
admiral-url=https\://10.192.59.142\:8282
.....<redacted>

@ghost
Copy link

ghost commented Dec 4, 2017

Issue moved to vmware/vic-product #1215 via ZenHub

@ghost
Copy link

ghost commented Dec 4, 2017

I've identified this as a problem with the fileserver so I'm moving it to vic-product.

@andrewtchin
Copy link

This can be closed as the issue is now in vic-product. Thanks Sergio

@sergiosagu
Copy link
Contributor

Closing this issue since it was moved to vmware/vic-product#1215

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants