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

Frodo script imports show up as garbage chars within AM #288

Closed
vscheuber opened this issue Oct 2, 2023 · 0 comments
Closed

Frodo script imports show up as garbage chars within AM #288

vscheuber opened this issue Oct 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@vscheuber
Copy link
Contributor

Frodo CLI version

v1.1.0

Describe the issue

This issue was reported via the ForgeRock Community channel: https://community.forgerock.com/t/frodo-script-imports-show-up-as-garbage-chars-within-am/4038

Hi,

We are trying to do the frodo import export as observed in this video https://www.youtube.com/watch?v=yGPnk7gR1dY 1

  1. frodo script export -A -x
    • this breaks down the script json and js files with a file based reference to the js files from within json
{
    "meta": {
        "origin": "http://am.example.com:8080/openam",
        "originAmVersion": "7.1.2",
        "exportedBy": "amadmin",
        "exportDate": "2023 -09 - 27T02: 54: 13.201Z",
        "exportTool": "frodo",
        "exportToolVersion": "v1.1.0[v18.5.0]"
    },
    "script": {
        "6b3cfd48 - 62d3 - 48ff - a96f - fe8f3a22ab30": {
            "_id": "6b3cfd48 - 62d3 - 48ff - a96f - fe8f3a22ab30",
            "name": "Amazon Profile Normalization",
            "description": "Normalizes raw profile data from Amazon",
            "script": "file://Amazon-Profile-Normalization.script.groovy",
            "default": true,
            "language": "GROOVY",
            "context": "SOCIAL_IDP_PROFILE_TRANSFORMATION",
            "createdBy": "id = dsameuser, ou = user, dc = openam, dc = forgerock, dc = org",
            "creationDate": 1433147666269,
            "lastModifiedBy": "id = dsameuser, ou = user, dc = openam, dc = forgerock, dc = org",
            "lastModifiedDate": 1433147666269
        }
    }
}
  1. perform changes on the scripts as exported
  2. Import the script back to AM using the command: frodo script import -f script.json -n scriptname

The script imported this way shows up as garbage chars in AM scripts.

See screenshot: https://backstage-community-prod.storage.googleapis.com/original/2X/d/d9cd4c6d0671a9bc3bd1faf0ba199bf3b50b8d31.png

Is there a limitation on the tool with such import export?

I am on version 7.1.2 of AM which still does base64 encode the scripts inside the json files. Would that be the reason for this?

Please advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant