Total Pageviews

Tuesday, September 10, 2019

integrating OpenAM with OpenIDM 500 Internal Server Error: "Invalid token"


I was integrating  integrating OpenAm with OpenIDM in AWS and got below error in OpenIDM logs


Resource exception: 500 Internal Server Error: "Invalid token"
org.forgerock.json.resource.InternalServerErrorException: Invalid token


org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 lambda$handleRequestWithLogging$8
WARNING: Resource exception: 500 Internal Server Error: "Invalid token"
org.forgerock.json.resource.InternalServerErrorException: Invalid token


Solution:

The only thing i did is i have installed "chrome" instead of "Firefox or "IE"

It resolve my issue and OpenIDM user was able to authenticate with OpenAM.




enabling Debuging at OpenAM



Type below url as per your environment

http://openam.test.com:8080/openam/Debug.jsp

Category   list all the available categories you can select and "Level" that have (Error, Warning, Message)

you can select any category and enable the logging.


here are the configuration files are


../../openamConfig/openam/debug




debug OpenAM SAML Assertion







How do I debug decrypted SAML assertions?

A. When assertions are encrypted, the Federation debug log does not contain decrypted assertion details by default. You can enable debug logging for unencrypted SAML assertions as follows:
  1. Log into the SP instance of AM/OpenAM as amadmin.
  2. Navigate to: <protocol>://host.fqdn:port/openam/Debug.jsp, for example: http://host1.example.com:8080/openam/Debug.jsp.
  3. Select Federation from the Category field, select Message from the Level field and then click Submit to change the debug level.
  4. Click TURN ON for the Debug encrypted SAML communications option, observing the warning that this outputs sensitive data to your logs.
  5. Click Confirm to save these debug settings. The decoded assertion XML from the IDP will now be output to the Federation debug log on the SP.

Friday, September 6, 2019

AWS Volume Error Invalid value 'instancenumber' for instanceId. Instance does not have a volume attached at root (/dev/sda1)


Error,

Attaching an instance to a volume and getting this error.



Invalid value 'i-instane number' for instanceId. Instance does not have a volume attached at root (/dev/sda1)



Solution:

by default when you attache a volume you get "/dev/sdf"  value in "Device" column

update "Device" value to  "/dev/sda1"

and start the instance. it will work.


Wednesday, August 7, 2019

AWS ec2-user asking password instead of certificate. changed /etc/ssh/sshd_config



if you changed by mistake the setting of the file /etc/ssh/sshd_config



#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication no



to


PasswordAuthentication yes
#PermitEmptyPasswords no
#PasswordAuthentication no


Now you cant login to ec2-user with the certificate.

it ask you to enter the password but you dont have the password

Solution:

login to server using -i

ssh -i ForgeRock.pem ec2-user@my.ip

It will let you login using the .pem file and it will not ask you for the password.

Now you can change the file /etc/ssh/sshd_config and restart the service

systemctl restart sshd