WSO2 身份服务器:编辑 /repository/conf/identity/service-providers 文件夹中的服务提供商
WSO2 Identity Server: Edit a service provider that was in the /repository/conf/identity/service-providers folder
我在 中问过类似的问题,但我认为这值得自己提出 post。
在 WSO2 Identity Server 中,我了解到如果将服务提供者放在文件夹 /repository/conf/identity/service-providers
中,则可以对其进行配置(仅在首次启动时)。我还了解到,如果它们是在首次启动时配置的,则无法通过管理控制台看到它们 ui。
你如何编辑它们?假设我想编辑现有服务提供商的声明?更改允许的 OAuth 授权类型?甚至删除服务提供商?
如果我在控制台看不到服务提供商,我该如何编辑或删除它?
一个后续但相关的问题:WSO2 提供的 "one and done" 服务提供商设置背后的原因是什么?我希望在我的 WSO2 实施的整个生命周期中添加服务提供商,如果我可以将文件放在一个文件夹中(repository/conf/identity/service-providers
文件夹只在第一次启动时工作)并重新启动我的服务器,而不是进入 UI 并执行多次单击以手动配置服务提供商或通过文件手动上传它。
编辑:@sajith 指出您应该 即使在服务器启动一次之后也能够配置服务提供商本文信息:https://docs.wso2.com/display/IS570/Configuring+a+SP+and+IdP+Using+Configuration+Files。但是,我还没有看到它成功运行。我知道发生了什么事,因为如果我尝试通过控制台(通过文件上传)上传服务提供商,我会收到错误消息:
控制台输出:
Caused by: org.wso2.carbon.identity.application.common.IdentityApplicationManagementException: Application with the same name loaded from the file system.
所以看起来 WSO2 服务器正在识别并加载新的服务提供商(即使在第一次启动之后),但我无法对它们进行身份验证。尝试针对新服务提供商进行身份验证时的示例响应:
{
"error_description": "A valid OAuth client could not be found for client_id: test",
"error": "invalid_client"
}
If I can't see the service provider in the console, how can I edit or
delete it? What's the reasoning behind the "one and done" service provider setup that WSO2 provides?
This document 表示您可以重新启动 WSO2 身份服务器以将基于文件的服务提供者和身份提供者配置(放置在 <IS_HOME>/repository/conf/identity/
中的配置)应用于系统。
我假设您已经混合了以下关于 claim configurations.
的注释
The claims configured in /repository/conf/claim-config.xml
file get applied only when you start the product for the first time,
or for any newly created tenants. With the first startup, claim
dialects and claims will be loaded from the file and persisted in the
database. Any consecutive updates to the file will not be picked up
and claim dialects and claims will be loaded from the database.
编辑:
{
"error_description": "A valid OAuth client could not be found for client_id: test",
"error": "invalid_client" }
这已经在您的 中得到了回答。 invalid_client
因为你在sp配置文件中设置了客户端id,但是身份服务器不支持通过这个文件配置InboundAuthenticationConfig。
Currently, the
InboundAuthenticationConfig in the deployed file is not supported.
But, you can have the SAML configurations in the
WSO2_HOME/repository/conf/identity/sso-idp-config.xml file.
因此,您可以为此目的使用 SOAP 管理服务。
我在
在 WSO2 Identity Server 中,我了解到如果将服务提供者放在文件夹 /repository/conf/identity/service-providers
中,则可以对其进行配置(仅在首次启动时)。我还了解到,如果它们是在首次启动时配置的,则无法通过管理控制台看到它们 ui。
你如何编辑它们?假设我想编辑现有服务提供商的声明?更改允许的 OAuth 授权类型?甚至删除服务提供商?
如果我在控制台看不到服务提供商,我该如何编辑或删除它?
一个后续但相关的问题:WSO2 提供的 "one and done" 服务提供商设置背后的原因是什么?我希望在我的 WSO2 实施的整个生命周期中添加服务提供商,如果我可以将文件放在一个文件夹中(repository/conf/identity/service-providers
文件夹只在第一次启动时工作)并重新启动我的服务器,而不是进入 UI 并执行多次单击以手动配置服务提供商或通过文件手动上传它。
编辑:@sajith 指出您应该 即使在服务器启动一次之后也能够配置服务提供商本文信息:https://docs.wso2.com/display/IS570/Configuring+a+SP+and+IdP+Using+Configuration+Files。但是,我还没有看到它成功运行。我知道发生了什么事,因为如果我尝试通过控制台(通过文件上传)上传服务提供商,我会收到错误消息:
控制台输出:
Caused by: org.wso2.carbon.identity.application.common.IdentityApplicationManagementException: Application with the same name loaded from the file system.
所以看起来 WSO2 服务器正在识别并加载新的服务提供商(即使在第一次启动之后),但我无法对它们进行身份验证。尝试针对新服务提供商进行身份验证时的示例响应:
{
"error_description": "A valid OAuth client could not be found for client_id: test",
"error": "invalid_client"
}
If I can't see the service provider in the console, how can I edit or delete it? What's the reasoning behind the "one and done" service provider setup that WSO2 provides?
This document 表示您可以重新启动 WSO2 身份服务器以将基于文件的服务提供者和身份提供者配置(放置在 <IS_HOME>/repository/conf/identity/
中的配置)应用于系统。
我假设您已经混合了以下关于 claim configurations.
的注释The claims configured in /repository/conf/claim-config.xml file get applied only when you start the product for the first time, or for any newly created tenants. With the first startup, claim dialects and claims will be loaded from the file and persisted in the database. Any consecutive updates to the file will not be picked up and claim dialects and claims will be loaded from the database.
编辑:
{ "error_description": "A valid OAuth client could not be found for client_id: test", "error": "invalid_client" }
这已经在您的 invalid_client
因为你在sp配置文件中设置了客户端id,但是身份服务器不支持通过这个文件配置InboundAuthenticationConfig。
Currently, the InboundAuthenticationConfig in the deployed file is not supported. But, you can have the SAML configurations in the WSO2_HOME/repository/conf/identity/sso-idp-config.xml file.
因此,您可以为此目的使用 SOAP 管理服务。