This topic has 1 reply, 1 voice, and was last updated 9 months, 3 weeks ago by soma.
-
AuthorPosts
-
September 10, 2021 at 11:41 am #28689
soma
ParticipantI have the following *.amster file:
amServerUrl = System.getenv("AM_SERVER_URL") amHome = System.getenv("OPENAM_HOME") connect \ --private-key amHome/security/keys/amster/amster_rsa \ amServerUrl import-config \ --path amHome/openam-tools/amster/export/openam.example.com \ --clean true \ --failOnError true :exit
Result:
Amster OpenAM Shell (7.1.0 build 4e72fe392c000b0a15027eb41267d01bfd2d2220, JVM: 11.0.12) Type ':help' or ':h' for help. ------------------------------------------------------------------------------- am> :load /root/openam/openam-tools/amster/openam-realm-configuration.amster ===> true ===> https://openam.example.com:8443/openam ===> /root/openam Could not connect to OpenAM server at https://openam.example.com:8443/openam Reason: Could not find the private key file: amHome/security/keys/amster/amster_rsa No connection to OpenAM found. Please connect to an OpenAM instance.
The defined
amHome
variable is recognized in the--private-key
param.I am new in the OpenAM 7.1 world. What I do not understand is I do not see the reason why you guys do not use the standard bash variable syntax for variables (
$
).Really hard to read this script because you have no idea whether the word is a “simple text” or a “variable” in the script. This is a really bad concept to use variables that way in your *.amster script file.
This one works fine:
amPassword = System.getenv("AM_ADMIN_PASSWORD") amCookieDomain = System.getenv("AM_COOKIE_DOMAIN") amServerUrl = System.getenv("AM_SERVER_URL") install-openam \ --acceptLicense \ --serverUrl amServerUrl \ --cookieDomain amCookieDomain \ --adminPwd amPassword
-
This topic was modified 9 months, 3 weeks ago by
soma.
September 10, 2021 at 2:26 pm #28691soma
Participantworkaround:
sed -i "s~amHome/~$OPENAM_HOME/~g" $OPENAM_HOME/openam-tools/amster/openam-realm-configuration.amster $OPENAM_HOME/openam-tools/amster/amster $OPENAM_HOME/openam-tools/amster/openam-realm-configuration.amster
The SED operation must be removed from the bash script once this bug is fixed.
-
This reply was modified 9 months, 3 weeks ago by
soma.
-
This topic was modified 9 months, 3 weeks ago by
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.