Giter Club home page Giter Club logo

frodo's People

Contributors

afalahi avatar atomicsamurai avatar gh-action-bump-version avatar justinchinfr avatar patrickdiligentforgerock avatar sayers-pi avatar storem avatar vscheuber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

frodo's Issues

Special characters in password must be escaped

Passwords with special characters, like the dollar sign, appear to be interpreted as if the dollar sign and following character are a shell variable. In my case, this variable was undefined so the password was missing those two characters and thus the response from AM was 401 unauthorized.

Fix default colors for output in Console.js

Colored output with the new Console.js: It appears that both MacOS and Windows use a sub-optimal color mapping for blueBright and blue ANSI colors. MacOS uses a purple and Windows 10 uses a dark blue. Considering that we use the 'info' output for all of the list commands, I don't like that we make all the users on those platforms change their terminal color mapping to get an acceptable output color. It appears that cyanBright and cyan are mapped the same across all the platforms. So my proposal is to shy away from using blueBright and blue anywhere in our output, as the outcome is unpredictable.

Support 6.5 and 6.0

We need to come up with a way to tell frodo what's possible with each version of our platform, especially new functionality like new API versions of the authenticate endpoint. Somewhere along the way we broke frodo for 6.x.

Support special characters in script names when exporting

Frodo should gracefully support special characters in filenames when exporting scripts (and other configuration artifacts).

% frodo script export -A volker                                                                                          
ForgeRock Identity Cloud detected.
Connected to ForgeRock Access Management 7.2.0-2022-4-SNAPSHOT Build 28162a406361e4d7a92a37c15bb1f8d6b6da7f90 (2022-May-04 20:45)
Exporting all scripts to separate files...
[=======================-----------------] 56% | 90/159 | Reading script Save/restore perpetratorERROR - can't save script to file
[========================================] 100% | 159/159 | Done
% 

journey import is broken

Describe the bug
Importing journeys fails.

To Reproduce
Steps to reproduce the behavior:

% frodo journey import nightly / -t PushRegistration -f PushRegistration.json 
Importing journey/tree...
ForgeOps deployment detected.
Connected to ForgeRock Access Management 7.2.0-SNAPSHOT Build e64bd0a58dc6560214d11f3105f2ee97d1a5821f (2022-February-08 15:27)
Importing scripts done
Importing email templates done
Importing inner nodes (nodes inside page nodes) done
Importing nodes [2de2c088-f21c-4db5-aa86-3f74db002181] [772bb737-1f08-4e0c-9b18-c3d83c38ebea] [8561422d-911f-44a0-b0e7-3483a531042a] done
Importing journey structure putJourneyStructureData ERROR: put journey structure error, journey PushRegistration - Request failed with status code 404 Error: Request failed with status code 404

Expected behavior

% frodo journey import nightly / -t PushRegistration -f ~/Projects/fidc/tenant/volker-dev/conf/alpha/journeys/PushRegistration.json
Importing journey/tree...
ForgeOps deployment detected.
Connected to ForgeRock Access Management 7.2.0-SNAPSHOT Build e64bd0a58dc6560214d11f3105f2ee97d1a5821f (2022-February-08 15:27)
Importing scripts done
Importing email templates done
Importing inner nodes (nodes inside page nodes) done
Importing nodes [2de2c088-f21c-4db5-aa86-3f74db002181] [772bb737-1f08-4e0c-9b18-c3d83c38ebea] [8561422d-911f-44a0-b0e7-3483a531042a] done
Importing journey structure done

Update to Node 17

As people start to use our tool more frequently, they are running the latest versions of node, which are 17.x. We are currently sitting on 16.13.0.

Make realm argument optional with dynamic default value

It would be nice to be able to dynamically determine a default realm if no realm argument was supplied to shorten commands if reasonable defaults exist. The following is proposed:

  • If realm is provided via realm argument, use the provided realm
  • If no realm argument is provided, determine realm by deployment type:
    • cloud: alpa
    • forgeops: /
    • classic: /

Add TOC to README

I think we need a TOC at the top right before the big title and the quick intro paragraph with anchor links to all the chapters in this now very long README. I'll add that in whenever I get to it but feel free to add it in yourself if you feel like it. I also think we need to move the install (not the build) instructions to the top right below the stub on how to get the binaries.

ID cloud automate logging secret installation

Is your feature request related to a problem? Please describe.
It is possible to use puppeteer to login and go generate a new logging secret, it could then grab that and provide it back to a node.js script, I think this would mean the command could become:

frodo logs install openam-fr-example.forgeblocks.com amadmin SuperSecretPassword

You could then use this command without ever logging into or using the UI to set up logging!

Describe alternatives you've considered
Not doing it

Implement a way to handle proxies

Some customers have proxies that will not allow certain applications to make HTTP calls. We noticed this with TelusHealth.
We could implement a -p option or something like that and have them add the proxy information so Frodo can make outbound calls. We probably should persist the proxy settings in the rc file

New github binary release pipeline for ES6 module based frodo app

Frodo originally used ES5 (CJS, CommonJS) modules, which is still the default for node.js. With the rest of the javascript world rapidly moving towards full adoption of ES6 modules, we want to join that wave and develop frodo using ES6 modules.

Pkg currently doesn't support packaging ES6 apps. The solution to this is to transpile the ES6 code to ES5 before packaging. That requires significant changes to our binary release pipeline.

running frodo first time throws "no such file or directory, open $HOME/.frodo/.frodorc'"

When running frodo for the first time, I get:

$ frodo info
ERROR: exception running frodo -  Error: ENOENT: no such file or directory, open '/home/sandeepc/.frodo/.frodorc'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at initConnections (file:///home/sandeepc/work/ForgeRock/sources/frodo/src/api/AuthApi.js:81:25)
at file:///home/sandeepc/work/ForgeRock/sources/frodo/src/app.js:24:9
at file:///home/sandeepc/work/ForgeRock/sources/frodo/src/app.js:38:3
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:337:24)
at async loadESM (node:internal/process/esm_loader:88:5)
at async handleMainPromise (node:internal/modules/run_main:65:12) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/sandeepc/.frodo/.frodorc'
}

import with -A option does not process any files

Describe the bug
-A option for import does not process any files

To Reproduce
Steps to reproduce the behavior:

  1. Export a journey, set of journeys or all journeys using the -A option.
  2. Switch to the directory containing the journey .json files3.
  3. Run frodo journey import -A

Expected behavior
Command imports all journey in current directory.

Actual behaviour
Command succeeds, but no journeys are imported.

Screenshots

frodo journey import -n -A $url/am alpha $u "$p"
ForgeRock Identity Cloud detected.
Connected to ForgeRock Access Management 7.2.0-2021-14-SNAPSHOT Build d3a206af06f9a22baec020cc5dbf989f0b523dcb (2022-March-07 17:41)
Saving creds in /Users/<$u>/.frodo/.frodorc...
Updating existing connection profile <$url>/am
Importing all journeys from separate files...
done.

Desktop (please complete the following information):

  • OS: MacOS
  • Version 11.6.2

Update README.md with user and developer instructions

Update the README.md to document the following use cases:

  • How to use the tool (these instructions are independent of the release type)
    • add plenty of samples
  • How to obtain and run the binaries
    • Link to binaries
  • How to run frodo as a node.js app
    • Include instructions on how to checkout the code
    • Document how to install dependencies
    • How to run the node.js version

Commit 59f7959ab0dc454366b384c4d41b715aa3f499de breaks macos

% frodo                 
SyntaxError: Unexpected identifier
    at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:139:18)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:236:14)
    at async link (node:internal/modules/esm/module_job:67:21)

removing the assert statement from the pkg import on line 13 makes it run again.

Frodo does not work if connecting to a platform instance using a self-signed SSL cert

ForgeOps hit its TLS cert quota and is currently operating with self-signed certs. This surfaced the issue that Frodo does not currently handle this. Frodo should always validate certs and warn the user if they are not trusted but it should also allow an option to turn off validation so the tool keeps operating against a dev or lab (or out of quota forgeops) env.

Improve global console output to print messages that are objects as objects

I noticed that error messages containing axios status objects are a bit meaningless:

Error! The request was made and the server responded with a status code! - Request failed with status code 400
[object Object]
400
[object Object]
[object Object]

We need to print out more levels than the top level of the axios status doc. I'll see where that is hiding.

Create a build pipeline

Create a non-github (local) build pipeline which uses a known version of nodejs so developers can get build and use the tool consistently.
For official releases, the github release action already uses a similar pipeline.

Refactor per module file names

Discussed in https://github.com/rockcarver/frodo/discussions/4

Originally posted by atomicsamurai December 23, 2021

  • Consider renaming files inside modules. Ali found run.js to be misleading as it implies the file could be or had to be run in some way, while it really is a library. @sandeep proposed to rename it to lib.js. Volker suggested renaming it to _lib.js or Lib.js. Since modules are already grouped in directories including the module name, Volker's approach might be double-knotted and not necessary. Feedback welcome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.