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

Error when importing a service provider from a yaml file #16572

Closed
ThaminduR opened this issue Sep 4, 2023 · 1 comment
Closed

Error when importing a service provider from a yaml file #16572

ThaminduR opened this issue Sep 4, 2023 · 1 comment

Comments

@ThaminduR
Copy link
Contributor

Describe the issue:
Following error occurs when importing a service provider from a yaml file. This is happening after upgrading to snakeyaml 2.xx (wso2/identity-api-server#480).
Need to check the other places where resources are being imported from yaml files (idp import API).

Caused by: Global tag is not allowed: tag:yaml.org,2002:org.wso2.carbon.identity.application.common.model.ServiceProvider
 in 'string', line 1, column 1:
    !!org.wso2.carbon.identity.appli ...
    ^

How to reproduce:

  1. Register an application.
  2. Export the application using following curl
curl --location 'https://localhost:9443/t/carbon.super/api/server/v1/applications/<app_id>/exportFile' \
--header 'Accept: application/yaml' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='
  1. Try importing the response of the above curl using following curl. (Change the service provider name before importing.)
curl --location 'https://localhost:9443/t/carbon.super/api/server/v1/applications/import' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--form 'file="yaml_content";type=application/yaml'

Possible Fix:
https://stackoverflow.com/questions/76717530/global-tag-is-not-allowed-exception-in-snakeyaml-2-0

@sahandilshan
Copy link
Contributor

This is not reproducible anymore. Hence closing the issue

Screen.Recording.2023-11-29.at.6.43.15.PM.mov

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

No branches or pull requests

7 participants