Skip to content

Host MITREid Connect on GCP

Pedro Felix edited this page Jun 5, 2019 · 1 revision

To host the MITREId Connect OIDC Provider server on GCP, perform the following steps:

  • Provision a CentOS VM on GCP.
  • On the instance, run sudo yum -y update.
  • On the instance, run sudo yum -y install tomcat.
    • This will install the Tomcat server on the VM. This server is required to host the WAR (Web Archive) produced by the MITREId build process. For Spring Boot we don't need this because the server is already embedded into the JAR.
  • On the instance, run sudo firewall-cmd --zone="trusted" --add-forward-port=port=80:proto=tcp:toport=8080 and sudo firewall-cmd --zone="trusted" --add-forward-port=port=80:proto=tcp:toport=8080 --permanent.
  • On the instance, run sudo systemctl start tomcat and sudo systemctl enable tomcat.
  • On the MITREId source code, edit the src/main/webapp/WEB-INF/server-config.xml file. Replace the hostname in the issuer property with the IP of the GCP instance and remove the port, so the standard port is used (example: <property name="issuer" value="http://35.230.141.228/openid-connect-server-webapp/" />).
  • Build the WAR by running the Maven Lifecycle package.
  • Copy the file target/openid-connect-server-webapp.war into the VM instance.
  • On the instance, copy the WAR file into /usr/share/tomcat/webapps.
  • Access http://the-public-vm-ip/openid-connect-server-webapp.
  • Use journalctl -u tomcat -f to observe the application logs.
  • If a new WAR is copied into /usr/share/tomcat/webapps, do sudo systemctl restart tomcat.
Clone this wiki locally