【问题标题】:Why OpenLiberty -OpenID connect server- discovery url response endpoint urls, are not HTTPs?为什么 OpenLiberty -OpenID connect server-discovery url 响应端点 url 不是 HTTPs?
【发布时间】:2020-07-23 04:22:48
【问题描述】:

我创建了一个具有 openid 连接提供程序配置的 OpenLiberty 服务器。 Server.xml 提取:

        <httpEndpoint host="example.net"
            httpPort="80" httpsPort="9443" id="defaultHttpEndpoint" />

        <oauth-roles>
            <authenticated>
                    <special-subject type="ALL_AUTHENTICATED_USERS" />
            </authenticated>
        </oauth-roles>

        <openidConnectProvider id="OP"
            oauthProviderRef="Oauth" signatureAlgorithm="RS256"
            keyStoreRef="defaultKeyStore" keyAliasName="default"
            issuerIdentifier="https://example.net/oidc/endpoint/OP">
            <scopeToClaimMap mail="mail"
                    profile="name, given_name, carLicense, preferredLanguage" />
            <claimToUserRegistryMap given_name="givenName"
                    name="sn" mail="mail" preferredLanguage="preferredLanguage"
                    carLicense="carLicense" />
        </openidConnectProvider>

        <oauthProvider accessTokenLifetime="300s" id="Oauth"
            httpsRequired="false"
            customLoginURL="https://example.net/oidc/login.jsp">
            <localStore>
            </localStore>
        </oauthProvider>

当我尝试访问 discoveryendpoint-url 时服务器启动后: https://example.net/oidc/endpoint/OP/.well-known/openid-configuration

回复:

  {"introspection_endpoint":"http://example.net/oidc/endpoint/OP/introspect",
  "coverage_map_endpoint":"http://example.net/oidc/endpoint/OP/coverage_map",
  :
  :
  :
  }

而在本地主机中:https://localhost:9443/oidc/endpoint/OP/.well-known/openid-configuration 我得到了

   {"introspection_endpoint":"https://localhost:9443/oidc/endpoint/OP/introspect",
    "coverage_map_endpoint":"https://localhost:9443/oidc/endpoint/OP/coverage_map",
    :
    :
   }

任何人都知道为什么我没有从 example.net 获得基于 https 的端点 url?

【问题讨论】:

    标签: openid-connect open-liberty


    【解决方案1】:

    您没有在端口 443 上侦听,因此此 url 可能有误: https://example.net/oidc/endpoint/OP/.well-known/openid-configuration 因为它需要在 443 上监听。或者您可能正在通过某种代理在 http 上转发到 Liberty。

    当像这样通过 http 访问时, http://example.net/oidc/endpoint/OP/.well-known/openid-configuration

    这将返回 http 端点,因为您的配置具有 httpsRequired=false。 您可以将其设置为 true 以禁止 http 通信。

    【讨论】:

    • 修改端口为 443 ,开始工作!!谢谢:-)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-04-23
    • 1970-01-01
    • 1970-01-01
    • 2020-08-14
    • 2017-10-18
    • 2019-02-08
    • 2016-06-01
    相关资源
    最近更新 更多