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

Minimal UAA setup for OAuth2 #538

Closed
MitchK opened this issue Feb 15, 2017 · 5 comments
Closed

Minimal UAA setup for OAuth2 #538

MitchK opened this issue Feb 15, 2017 · 5 comments
Labels
accepted Accepted the issue

Comments

@MitchK
Copy link

MitchK commented Feb 15, 2017

I am trying to deploy UAA in a non-Cloud-Foundry environment. I'm using Docker and deploy UAA as a .war to a Tomcat. This is my Dockerfile:

FROM ubuntu


RUN apt-get update; apt-get install -y git wget tar openjdk-8-jdk


# Download and build UAA
ENV UAA_VERSION=3.10.0
ENV UAA_CONFIG_PATH /uaa
RUN git clone https://github.com/cloudfoundry/uaa.git $UAA_CONFIG_PATH
WORKDIR $UAA_CONFIG_PATH
RUN git checkout $UAA_VERSION
RUN ./gradlew build -x test

# Download Tomcat
ENV TOMCAT_VERSION=8.0.41
ENV CATALINA_HOME /tomcat

RUN wget -q https://archive.apache.org/dist/tomcat/tomcat-8/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz
RUN wget -qO- https://archive.apache.org/dist/tomcat/tomcat-8/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz.md5 | md5sum -c -
RUN tar zxf apache-tomcat-$TOMCAT_VERSION.tar.gz
RUN rm apache-tomcat-$TOMCAT_VERSION.tar.gz
RUN mkdir $CATALINA_HOME
RUN mv apache-tomcat-$TOMCAT_VERSION/* $CATALINA_HOME
RUN rm -rf $CATALINA_HOME/webapps/*

# Deploy UAA to tomcat
RUN cp $UAA_CONFIG_PATH/uaa/build/libs/cloudfoundry-identity-uaa-$UAA_VERSION.war /tomcat/webapps/ROOT.war

# Add config
ADD uaa.yml $UAA_CONFIG_PATH/uaa.yml

EXPOSE 8080

CMD $CATALINA_HOME/bin/catalina.sh run

If I run the container, I get this error:

...
caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'login.serviceProviderKey' in string value "${login.serviceProviderKey}"

Obviously, I have not set a configuration key. My uaa.yml is currently just an empty file. Unfortunately, I could not find any hint in the documentation on what parameters are required. Again, I just want a minimal OAuth flow (perhaps it's fine with hardcoded credentials now) to be working.

Thanks

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/139977997

The labels on this github issue will be updated when the story is started.

@MitchK
Copy link
Author

MitchK commented Feb 15, 2017

If I just run ./gradlew run locally, everything seems to work. What's the difference?

@fhanik
Copy link
Contributor

fhanik commented Feb 15, 2017

https://github.com/cloudfoundry/uaa/tree/develop#deploy-to-cloud-foundry

First paragraph has a link to the required values. That's should be all you need.
If you generate a manifest (see gradlew manifest) in the same section, it should give you the parameters that you need, including UAA_URL and LOGIN_URL

@MitchK
Copy link
Author

MitchK commented Feb 15, 2017

Thanks , that helped!

@harpratap
Copy link

@MitchK Can you list out the steps that you performed to solve this? I don't understand what manifest is doing here. Does it generate a sample uaa.yml for us?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Accepted the issue
Projects
None yet
Development

No branches or pull requests

4 participants