3-3. Roles Anywhere
Use IAM Roles Anywhere when the Logpresso Sonar server cannot hold a long lived access key. The server proves its identity with an X.509 certificate, obtains temporary credentials, and calls AWS APIs with them. The Roles Anywhere connection profile is supported from AWS 2.0.2612.0.
If you use an access key or STS, skip this page and follow 3-1. IAM User or 3-2. STS instead.
AWS Configuration
-
In Trust anchors of the IAM Roles Anywhere console, create a trust anchor and register the CA certificate that issues your certificates. Copy the trust anchor ARN.
-
In Profiles, create a Roles Anywhere profile and register the IAM role to assume. Copy the profile ARN.
-
Add the Roles Anywhere service to the trust policy of that IAM role, and attach the policy created in 2. IAM Policy Configuration to the role.
-
Prepare the end entity certificate issued by the CA of the trust anchor, and its private key.
Two ways to hold the identity
The fields of the connection profile depend on where the certificate and private key live. Use one way only; filling in fields of both ways fails when the profile is saved.
| Way | When to use | Fields to fill in | Extra install |
|---|---|---|---|
| Pasted certificate | The certificate and private key can be stored as PEM text | Certificate, Private Key | None |
| Signing helper | The private key lives in a PKCS#11 token or HSM, a TPM, or an OS certificate store, where the JVM cannot read it | Signing Helper Path and the locator fields below | Credential Helper required |
The pasted certificate way signs inside the Sonar process with the IAM Roles Anywhere Java plugin bundled in the app, so no external program is needed. Once Signing Helper Path is filled in, the Certificate and Private Key fields are ignored and the Credential Helper below signs instead.
Installing the Credential Helper
Needed only for the signing helper way. Download the AWS IAM Roles Anywhere Credential Helper (binary name aws_signing_helper) onto the Logpresso Sonar server. Sonar runs its credential-process command to obtain temporary credentials.
1. Download
The paths below are for version 1.8.6 as of December 2026. For the latest version, the macOS builds, and the SHA256 checksum of each file, see the AWS documentation.
| OS | Architecture | Download URL |
|---|---|---|
| Linux | x86-64 | https://rolesanywhere.amazonaws.com/releases/1.8.6/X86_64/Linux/Amzn2023/aws_signing_helper |
| Linux | Aarch64 | https://rolesanywhere.amazonaws.com/releases/1.8.6/Aarch64/Linux/Amzn2023/aws_signing_helper |
| Windows | x86-64 | https://rolesanywhere.amazonaws.com/releases/1.8.6/X86_64/Windows/Server2022/aws_signing_helper.exe |
curl -o /opt/logpresso/bin/aws_signing_helper \
https://rolesanywhere.amazonaws.com/releases/1.8.6/X86_64/Linux/Amzn2023/aws_signing_helper
sha256sum /opt/logpresso/bin/aws_signing_helper
chmod +x /opt/logpresso/bin/aws_signing_helper
2. Check the execute permission
The account that runs the Sonar service must be able to execute the file. Sonar does not use PATH; it runs exactly the path entered in the connection profile, so enter an absolute path in Signing Helper Path.
3. Check that the certificate can be read
Reading the certificate with the helper alone, before creating the connection profile, separates a Sonar configuration problem from a key store problem.
# Print the certificate given as a file path or a PKCS#11 URI
/opt/logpresso/bin/aws_signing_helper read-certificate-data \
--certificate 'pkcs11:object=My%20RA%20key'
# Test-sign with the certificate picked from an OS store by a selector
/opt/logpresso/bin/aws_signing_helper sign-string \
--cert-selector 'Key=x509Subject,Value=CN=logpresso-sonar'
With a selector, read-certificate-data prints every matching certificate, so narrow the selector when more than one appears. For PKCS#11 it also prints a URI per certificate; enter that value in Helper Certificate as is.
Adding the connection profile
Go to Settings > Connect Profiles, click Add, and select AWS (Roles Anywhere) as the Type.
The common fields are the same as in 5. Connection Profile. The Roles Anywhere fields are as follows.
| Group | Field | Value |
|---|---|---|
| Required | Trust Anchor ARN | ARN copied in AWS configuration step 1 (arn:aws:rolesanywhere:{region}:{account}:trust-anchor/{identifier}) |
| Required | Profile ARN | ARN copied in AWS configuration step 2 (arn:aws:rolesanywhere:{region}:{account}:profile/{identifier}) |
| Required | Role ARN | ARN of the IAM role to assume. It must be listed in the Roles Anywhere profile |
| Optional | Role Session Name | Fill in only when acceptRoleSessionName is enabled on the Roles Anywhere profile. When empty, the service derives the name from the certificate |
| Optional | Session Duration | Lifetime of the temporary credentials in seconds (900 to 43200). AWS uses 3600 when empty. The call fails if it exceeds the maximum session duration of the role |
| Pasted certificate | Certificate | PEM text of the end entity certificate |
| Pasted certificate | Private Key | PEM text of the private key; stored encrypted |
| Pasted certificate | Key Algorithm | RSA or EC. Inferred from the key when empty |
| Pasted certificate | Certificate Chain | Concatenated PEM of the intermediate certificates, when the certificate does not chain directly to the trust anchor |
| Signing helper | Signing Helper Path | Path to the aws_signing_helper binary. Setting it switches the profile to out of process signing |
| Signing helper | Helper Certificate | A file path or a pkcs11: URI |
| Signing helper | Helper Private Key | A file path, a pkcs11: URI, or a TPM handle |
| Signing helper | Certificate Selector | Picks a certificate out of an OS certificate store. Format Key=x509Subject,Value=CN=name; the x509Issuer and x509Serial keys also work |
| Signing helper | System Store Name | Name of the OS certificate store, usually MY on Windows |
| Signing helper | PKCS#11 Library | Path to the PKCS#11 module of the token or HSM |
| Signing helper | PKCS#11 PIN | PIN of the token; stored encrypted |
| Signing helper | Reuse PKCS#11 PIN | true for tokens that use the user PIN as the signing PIN |
| Signing helper | TPM Key Password | Only for a password protected TPM key; stored encrypted |
Verifying the setup
After saving the connection profile, run a query command to confirm that credentials are issued. Replace {profile name} with the name of the connection profile.
A list of regions means the app obtained temporary credentials through Roles Anywhere and called the AWS API with them.
References
- IAM Roles Anywhere Credential Helper - download URLs, SHA256 checksums, and the full option list
- Credential Helper source - the README carries PKCS#11 and TPM locator examples
- Getting started with IAM Roles Anywhere - creating a trust anchor and a profile
- IAM Roles Anywhere service endpoints - for setting a VPC endpoint on a closed network