Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ jobs:
build-mode: ${{ matrix.build-mode }}
queries: security-and-quality
config: |
query-filters:
# Parameters are dictated by interface, OSGi Declarative Services and Disruptor
# contracts throughout the code base; the query only reports those.
- exclude:
id: java/unused-parameter
paths-ignore:
- '**/src/test/**'
- '**/src/it/**'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions Copyright [year] [name of copyright owner]".
*
* Copyright 2014-2016 ForgeRock AS.
* Portions Copyright 2026 3A Systems, LLC.
*/

package org.forgerock.openidm.audit.impl;
Expand Down Expand Up @@ -121,6 +122,7 @@ private static class ActionFilter<A extends Enum<A>> extends FieldValueFilter<A>

private ActionFilter(final Class<A> clazz, final Set<A> actionsToLog) {
super(FIELD_ACTION, actionsToLog, new JsonValueObjectConverter<A>() {
@Override
public A apply(JsonValue value) throws JsonValueException {
return value.as(enumConstant(clazz));
}
Expand Down Expand Up @@ -154,6 +156,7 @@ private static class OperationFilter<A extends Enum<A>> extends FieldValueFilter

private OperationFilter(final Class<A> clazz, final Set<A> actionsToLog) {
super(OPERATION, actionsToLog, new JsonValueObjectConverter<A>() {
@Override
public A apply(JsonValue value) throws JsonValueException {
return value.as(enumConstant(clazz));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2013-2015 ForgeRock AS.
* Portions copyright 2025 3A Systems LLC.
* Portions copyright 2025-2026 3A Systems LLC.
*/

package org.forgerock.openidm.auth;
Expand Down Expand Up @@ -60,6 +60,7 @@ public PassthroughAuthenticator(Provider<ConnectionFactory> connectionFactoryPro
* @return <code>true</code> if authentication is successful.
* @throws ResourceException if there is a problem whilst attempting to authenticate the user.
*/
@Override
public AuthenticatorResult authenticate(String username, String password, Context context) throws ResourceException {

final ConnectionFactory connectionFactory = connectionFactoryProvider.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2011-2015 ForgeRock AS.
* Portions copyright 2024-2025 3A Systems LLC.
* Portions copyright 2024-2026 3A Systems LLC.
*/

package org.forgerock.openidm.auth;
Expand Down Expand Up @@ -91,6 +91,7 @@ public ResourceQueryAuthenticator(Provider<CryptoService> cryptoService, Provide
* @param context the Context to use
* @return True if authentication is successful, otherwise false.
*/
@Override
public AuthenticatorResult authenticate(String username, String password, Context context) throws ResourceException {

Reject.ifNull(username, "Provided username was null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions Copyrighted [year] [name of copyright owner]".
*
* Copyright 2015 ForgeRock AS. All rights reserved.
* Portions Copyright 2026 3A Systems, LLC.
*/

package org.forgerock.openidm.auth;
Expand Down Expand Up @@ -71,6 +72,7 @@ public StaticAuthenticator(String username, String password) {
* @param context the Context to use
* @return True if authentication is successful, otherwise false.
*/
@Override
public AuthenticatorResult authenticate(String username, String password, Context context) throws ResourceException {

Reject.ifNull(username, "Provided username was null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2014-2016 ForgeRock AS.
* Portions copyright 2025 3A Systems LLC.
* Portions copyright 2025-2026 3A Systems LLC.
*/

package org.forgerock.openidm.auth.modules;
Expand Down Expand Up @@ -135,6 +135,7 @@ public Promise<AuthStatus, AuthenticationException> validateRequest(MessageInfoC
if (authenticateUsingClientCert(messageInfo, req, securityContextMapper)) {
final String authcid = securityContextMapper.getAuthenticationId();
clientSubject.getPrincipals().add(new Principal() {
@Override
public String getName() {
return authcid;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2013-2016 ForgeRock AS.
* Portions Copyright 2026 3A Systems, LLC.
*/

package org.forgerock.openidm.auth.modules;
Expand Down Expand Up @@ -145,6 +146,7 @@ public Promise<AuthStatus, AuthenticationException> validateRequest(MessageInfoC

final String authcid = securityContextMapper.getAuthenticationId();
clientSubject.getPrincipals().add(new Principal() {
@Override
public String getName() {
return authcid;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2014-2016 ForgeRock AS.
* Portions Copyright 2026 3A Systems, LLC.
*/

package org.forgerock.openidm.auth.modules;
Expand Down Expand Up @@ -55,6 +56,7 @@ class MappingRoleCalculator implements RoleCalculator {
* @param resource the retrieved resource for the principal.
* @return the list of calculated roles
*/
@Override
public List<String> calculateRoles(String principal, ResourceResponse resource) {
List<String> roles = new ArrayList<>();

Expand Down Expand Up @@ -100,20 +102,23 @@ private boolean isMemberOfRoleGroups(List<String> groups, List<String> groupMemb
enum GroupComparison {
/* case-sensitive equality */
equals {
@Override
public boolean compare(final String groupA, final String groupB) {
return groupA.equals(groupB);
}
},

/* case-insensitive equality */
caseInsensitive {
@Override
public boolean compare(final String groupA, final String groupB) {
return groupA.equalsIgnoreCase(groupB);
}
},

/* LDAP case- and whitespace-insensitive matching */
ldap {
@Override
public boolean compare(final String groupA, final String groupB) {
// ldap is case (and to some degree whitespace) insensitive, so we have to be too:
return groupA.replaceAll(LDAP_WHITESPACE, "$1").equalsIgnoreCase(groupB.replaceAll(LDAP_WHITESPACE, "$1"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2014-2016 ForgeRock AS.
* Portions Copyright 2026 3A Systems, LLC.
*/

package org.forgerock.openidm.auth.modules;
Expand Down Expand Up @@ -57,6 +58,7 @@ class PropertyRoleCalculator implements RoleCalculator {
* @param resource the retrieved resource for the principal.
* @return a list of calculated roles
*/
@Override
public List<String> calculateRoles(String principal, ResourceResponse resource) {
List<String> roles = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015-2016 ForgeRock AS.
* Portions Copyright 2026 3A Systems, LLC.
*/
package org.forgerock.openidm.auth.modules;

Expand Down Expand Up @@ -101,6 +102,7 @@ public Promise<AuthStatus, AuthenticationException> validateRequest(MessageInfoC
final String authenticationId = attributes.get(authenticationIdAttribute).asString();
securityContextMapper.setAuthenticationId(authenticationId);
clientSubject.getPrincipals().add(new Principal() {
@Override
public String getName() {
return authenticationId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Portions copyright 2013-2016 ForgeRock AS.
* Portions Copyrighted 2024 3A Systems LLC.
* Portions Copyrighted 2024-2026 3A Systems LLC.
*/
package org.forgerock.openidm.cluster;

Expand Down Expand Up @@ -360,6 +360,7 @@ private Map<String, Object> getInstanceMap(JsonValue instanceValue) {
return instanceInfo;
}

@Override
public void renewRecoveryLease(String instanceId) {
synchronized (repoLock) {
try {
Expand Down Expand Up @@ -770,6 +771,7 @@ public void startup() {
running = true;
logger.info("Starting the cluster manager thread");
handler = scheduler.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
try {
// Check in this instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2011-2015 ForgeRock AS. All Rights Reserved
* Portions Copyright 2026 3A Systems, LLC.
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
Expand Down Expand Up @@ -49,6 +50,7 @@ public class DelayedConfigHandler implements ProviderListener {
/**
* {@inheritDoc}
*/
@Override
public void init(ConfigCrypto configCrypto) {
this.configCrypto = configCrypto;
}
Expand All @@ -65,6 +67,7 @@ public void addConfig(DelayedConfig config) {
/**
* Detects changed meta data providers
*/
@Override
public void addedProvider(Object originId, MetaDataProvider provider) {
for (DelayedConfig config : delayedConfigs) {
if (configCrypto != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2011-2016 ForgeRock AS.
* Portions Copyright 2026 3A Systems, LLC.
*/
package org.forgerock.openidm.config.installer;

Expand Down Expand Up @@ -101,6 +102,7 @@ public void stop(BundleContext ctx) {
logger.debug("Stopped JSON configuration listener");
}

@Override
public boolean canHandle(File artifact) {
if (this.configAdmin == null) {
// See if the configuration admin service is available now
Expand All @@ -118,21 +120,25 @@ public boolean canHandle(File artifact) {
}
}

@Override
public void install(File artifact) throws Exception {
logger.debug("Artifact install {}", artifact);
setConfig(artifact);
}

@Override
public void update(File artifact) throws Exception {
logger.debug("Artifact update {}", artifact);
setConfig(artifact);
}

@Override
public void uninstall(File artifact) throws Exception {
logger.debug("Artifact uninstall {}", artifact);
deleteConfig(artifact);
}

@Override
public void configurationEvent(ConfigurationEvent configurationEvent) {
logger.debug("ConfigurationEvent {}, pid: {}, factoryPid: {}, type: {}",
configurationEvent, configurationEvent.getPid(), configurationEvent.getFactoryPid(),
Expand Down Expand Up @@ -500,16 +506,19 @@ public Iterator<Entry<U, V>> iterator() {

private U key;

@Override
public boolean hasNext() {
return e.hasMoreElements();
}

@Override
public Entry<U, V> next() {

key = e.nextElement();
return new KeyEntry(key);
}

@Override
public void remove() {

if (key == null) {
Expand Down Expand Up @@ -541,14 +550,17 @@ class KeyEntry implements Map.Entry<U,V> {
this.key = key;
}

@Override
public U getKey() {
return key;
}

@Override
public V getValue() {
return dict.get(key);
}

@Override
public V setValue(V value) {
return DictionaryAsMap.this.put(key, value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
* Portions Copyright 2026 3A Systems, LLC.
*/
/**
* Plug-in based on the AP 2.0 licensed Jackson Indenter
Expand Down Expand Up @@ -69,8 +71,10 @@ public void setIndentSpaces(int noOfSpaces) {
this.noOfSpaces = noOfSpaces;
}

@Override
public boolean isInline() { return false; }

@Override
public void writeIndentation(JsonGenerator jg, int level)
throws IOException, JsonGenerationException {
jg.writeRaw(SYSTEM_LINE_SEPARATOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,7 @@ String getPidOrFactoryPid() {
: ConfigBootstrapHelper.qualifyPid(pid);
}

@Override
public String toString() {
return isFactoryConfig()
? (factoryPid + "/" + instanceAlias)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* Portions Copyrighted 2024 3A Systems LLC.
* Portions Copyrighted 2024-2026 3A Systems LLC.
*/
package org.forgerock.openidm.config.persistence;

Expand Down Expand Up @@ -49,6 +49,7 @@ public class Activator implements BundleActivator {

JSONConfigInstaller installer;

@Override
public void start(BundleContext context) {
logger.debug("Config Bundle starting");
// Re-direct OSGi logging to the same openidm log
Expand Down Expand Up @@ -84,6 +85,7 @@ public void start(BundleContext context) {
logger.info("OpenIDM is starting from {}", IdentityServer.getInstance().getServerRoot());
}

@Override
public void stop(BundleContext context) {
if (installer != null) {
installer.stop(context);
Expand Down
Loading
Loading