Minimal UAA setup for OAuth2
See original GitHub issueI 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
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
User Account and Authentication (UAA) Server
UAA has endpoints for managing user accounts and for registering OAuth2 clients, ... This is the minimum number of UAA instances Cloud Foundry...
Read more >A Quick Guide To Using Cloud Foundry UAA - Baeldung
Learn how to use the Cloud Foundry User Account and Authentication (CF UAA) as an identity management service.
Read more >How to Integrate an Application with Cloud Foundry using ...
This article explains how to use Cloud Foundry APIs from a user application using the built in identity management solution in
Read more >uaa job from uaa/74.12.0 - Cloud Foundry BOSH
The UAA is the identity management service for Cloud Foundry. It's primary role is as an OAuth2 provider, issuing tokens for client applications...
Read more >OAuth2 Autoconfig - Spring
A minimal Spring Security Gradle set of dependencies typically looks like the following: build.gradle. dependencies { compile 'org.springframework.boot:spring- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 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?