为什么 OpenLiberty -OpenID 连接服务器 - 发现 url 响应端点 urls,不是 HTTPs?

Why OpenLiberty -OpenID connect server- discovery url response endpoint urls, are not HTTPs?

我已经使用 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>

当我尝试访问发现端点时服务器启动后-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 的端点 urls 吗?

您没有在端口 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

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