Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"tenant.conf" migration from APIM 4.2.0 to APIM 4.3.0 - Missing Scope -role mapping #3575

Open
nadeepoornima opened this issue Feb 6, 2025 · 0 comments
Labels

Comments

@nadeepoornima
Copy link

Description

The following scope-role mapping was missed during the APIM 4.2.0 to APIM 4.3.0 migration.

{
				"Name": "apim:api_provider_change",
				"Roles": "admin"
			},
			{
				"Name": "apim:gateway_policy_manage",
				"Roles": "admin"
			},
			{
				"Name": "apim:gateway_policy_view",
				"Roles": "admin,Internal/creator,Internal/publisher,Internal/observer"
			}

This issue occurs because the aforementioned scopes are not included in the runtime migration of tenant-conf.json scopes. Only the scopes listed in [1] are checked during this process.

We need to fix this by adding all missing scope-role mappings.

[1]. https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/config/APIMConfigServiceImpl.java#L196

Steps to Reproduce

  • Migrated from APIM 3.2.0 to APIM 4.3.0
  • Log into the system and show the below warns
TID: [-1234] Tenant: [carbon.super] [2025-01-27 09:45:42,515] [228786af-af35-480e-9844-a30514a6f246] : apim :  WARN {org.wso2.carbon.apimgt.rest.api.admin.v1.utils.mappings.SystemScopesMappingUtil} - The scope apim:gateway_policy_manage does not exist in tenant.conf
TID: [-1234] Tenant: [carbon.super] [2025-01-27 09:45:42,515] [228786af-af35-480e-9844-a30514a6f246] : apim :  WARN {org.wso2.carbon.apimgt.rest.api.admin.v1.utils.mappings.SystemScopesMappingUtil} - The scope apim:gateway_policy_view does not exist in tenant.conf
TID: [-1234] Tenant: [carbon.super] [2025-01-27 09:45:42,515] [228786af-af35-480e-9844-a30514a6f246] : apim :  WARN {org.wso2.carbon.apimgt.rest.api.admin.v1.utils.mappings.SystemScopesMappingUtil} - The scope apim:api_provider_change does not exist in tenant.conf

Version

APIM 4.3.0

Environment Details (with versions)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant