0

我的配置如下: 1 台服务器具有单独的发布者(9446)和存储(端口 9447)。两者都配置了共享的 gov/config 注册表(请注意,发布者是相同的,除了远程实例 url 的 localhost:9446/registry :

<dbConfig name="govregistry">
    <dataSource>jdbc/WSO2SHAREDCONREG_DB</dataSource>
</dbConfig>
<remoteInstance url="https://localhost:9447/registry">
    <id>gov</id>
    <dbConfig>govregistry</dbConfig>
    <readOnly>false</readOnly>
    <enableCache>true</enableCache>
    <registryRoot>/</registryRoot>
</remoteInstance>
<mount path="/_system/governance" overwrite="true">
    <instanceId>gov</instanceId>
    <targetPath>/_system/governance</targetPath>
</mount>
<mount path="/_system/config" overwrite="true">
    <instanceId>gov</instanceId>
    <targetPath>/_system/nodes</targetPath>
</mount>

我在另一台服务器上有网关和密钥管理器。它们都部署到不同的目录,WSO2 文档没有说要为 registry.xml 文件做任何额外的事情,所以它们看起来像:

<currentDBConfig>wso2registry</currentDBConfig>
<dbConfig name="wso2registry">
    <dataSource>jdbc/WSO2CarbonDB</dataSource>
</dbConfig>

当 API 发布,然后我尝试使用“试用”功能时,我收到以下错误(无论 API 是否设置为需要令牌)...此错误在网关服务器上:

[2014-01-23 21:54:31,111] ERROR - APIAuthenticationHandler API authentication failure
org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException: Access failure for API: /newphoneverify, version: 1.0.0 with key: null

我是否还需要做一些额外的事情,比如在密钥管理器和网关上设置治理和配置注册表共享?

4

2 回答 2

0

我也有同样的问题:

Swagger UI 不起作用并返回与上面相同的屏幕截图,但如果我使用 chrome/postman,API 会返回正确的值,所以只是 swagger UI 有问题,我在 API 管理器前面有一个 Apache 和外部名称store 不同于内部名称和 apache proxypass 请求。

我已经配置了 api-manager.xml 并且 API 没有授权(全部设置为无)真的不知道如何修复它。

于 2014-03-12T22:20:09.280 回答
0

如果 API 的 OPTIONS 动词未使用“无”身份验证类型启用,则会发生这种情况。检查 [1]。

[1] https://wso2.org/jira/browse/APIMANAGER-1819

于 2014-01-24T04:42:04.407 回答