401 Unauthorized error when building ForgeRock Identity Platform from source
The purpose of this article is to provide assistance if building AM, DS, IDM or IG from source fails with a "401 Unauthorized" error stating authentication failed or a "Not Authorized" error. This issue will occur when accessing artifacts in the Maven repositories and will refer to a non-resolvable POM. If you download binaries using a curl command, you will see a 403 "Props Authentication Token not found" response instead.
Symptoms
Errors similar to the following are shown when your build fails:
- 401 Unauthorized[ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for org.forgerock.openig:openig-bom:7.1.0: Could not transfer artifact org.forgerock:forgerock-parent:pom:4.0.9 from/to forgerock-internal-releases (https://maven.forgerock.org/repo/internal-releases): authentication failed for https://maven.forgerock.org/repo/internal-releases/org/forgerock/forgerock-parent/4.0.9/forgerock-parent-4.0.9.pom, status: 401 Unauthorized and 'parent.relativePath' points at no local POM @ org.forgerock.openig:openig-bom:7.1.0
- Not Authorized[ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Non-resolvable import POM: Could not transfer artifact org.forgerock.am:openam-auth-trees:pom:6.0.0 from/to forgerock-build-dependencies (https://maven.forgerock.org/repo/forgerock-openam-6.5.2.3-dependencies): Not authorized , ReasonPhrase:. @ line 39, column 25
The actual pom referenced and product will differ depending on what you are trying to build.
If you download binaries using a curl command, you will see the following response instead:{ "errors" : [ { "status" : 403, "message" : "Props Authentication Token not found" } ] }
Recent Changes
N/A
Causes
ForgeRock upgraded Artifactory (maven.forgerock.org) from 6.x to the latest version (7.33.12). This major upgrade changes the way passwords are encrypted. As a result, the settings.xml file (which contains passwords encrypted with the earlier Artifactory version) is no longer compatible with the new Artifactory version.
Solution
This issue can be resolved by regenerating your settings.xml file. See How do I access the ForgeRock protected Maven repositories? for further information.
If you are downloading binaries using a curl command, you will also need to refresh your authentication tokens.
See Also
Source code in ForgeRock products
Related Training
N/A
Related Issue Tracker IDs
N/A