使用uaa.yml配置UAA cloudfoundry

问题描述 投票:0回答:1

我尝试只使用没有cf和其他服务的UAA服务。使用快速入门我在带有Cent OS 7的vmware vSphere虚拟机上安装了UAA服务。我将主机名设置为vm。我用它运行:

 CLOUD_FOUNDRY_CONFIG_PATH=/tmp/config/ ./gradlew run
uaa:
  url: http://uaa-sp.intra.mydomain.com:8080/uaa
  host: uaa-sp.intra
aplications:
  host: uaa-sp.intra
  env:
    UAA_URL: http://uaa-sp.intra.mydomain.com:8080/uaa/
    LOGIN_URL: http://uaa-sp.intra.mydomain.com:8080/uaa/
scim:
  users:
    - [email protected]|123456|uaa.admin,clients.secret,scim.write,scim.read,openid
login:
  serviceProviderKey: |
    -----BEGIN RSA PRIVATE KEY-----
    ...
    -----END RSA PRIVATE KEY-----
  serviceProviderCertificate: |
    -----BEGIN CERTIFICATE-----
    ...
    -----END CERTIFICATE-----

我可以访问它,但如果我尝试获取SP saml元数据,它会使用Location“localhost”生成它

<?xml version="1.0" encoding="UTF-8"?><md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" ID="cloudfoundry-saml-login" entityID="cloudfoundry-saml-login"><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference URI="#cloudfoundry-saml-login"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>nEMzJnjHoN4jIZSP+a1Jk01SbJA=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>XosmlNR5OckP7gUUrl6VVdDxs38kHO5Hq6PfMMJJG7xKT1UtYbes0tmLZR4cTOVwlZrFAyBY9liHq9heq0Q/zg5NAfP2hBmckvtkRTJlNXAJzlIkcFgoOmqFjCQ4EFhF5uK6JrnTHdoEEBWrhc53nGu++w1FqbeE4QkOm8B52no=</ds:SignatureValue><ds:KeyInfo><ds:X509Data><ds:X509Certificate>...</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature><md:SPSSODescriptor AuthnRequestsSigned="true" WantAssertionsSigned="true" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"><md:KeyDescriptor use="signing"><ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:X509Data><ds:X509Certificate>...</ds:X509Certificate></ds:X509Data></ds:KeyInfo></md:KeyDescriptor><md:KeyDescriptor use="encryption"><ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:X509Data><ds:X509Certificate>...</ds:X509Certificate></ds:X509Data></ds:KeyInfo></md:KeyDescriptor><md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://localhost:8080/uaa/saml/SingleLogout/alias/cloudfoundry-saml-login"/><md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="http://localhost:8080/uaa/saml/SingleLogout/alias/cloudfoundry-saml-login"/><md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</md:NameIDFormat><md:NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</md:NameIDFormat><md:NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</md:NameIDFormat><md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat><md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName</md:NameIDFormat>
<md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://localhost:8080/uaa/saml/SSO/alias/cloudfoundry-saml-login" index="0" isDefault="true"/>
<md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:URI" Location="http://localhost:8080/uaa/oauth/token/alias/cloudfoundry-saml-login" index="1"/>
</md:SPSSODescriptor></md:EntityDescriptor>

同样如果我执行uaac上下文,我得到正确的地址

[root@uaa-sp ~]# uaac context
[0]*[http://uaa-sp.intra.mydomain.com:8080/uaa]

如何正确配置uaa.yml以获得正确的sp元数据?我找不到有关uaa.yml的信息。或者,如果没有整个CloudFoundry服务,则无法配置此服务?

single-sign-on cloudfoundry saml-2.0 cloudfoundry-uaa
1个回答
0
投票

弄清楚:你需要设置login.entityBaseURL:http://uaa-sp.intra.mydomain.com:8080/uaa

© www.soinside.com 2019 - 2024. All rights reserved.