Skip to content

Commit

Permalink
feat(config-api): pagination implemented in fido2, session and token …
Browse files Browse the repository at this point in the history
…endpoints (#9889)

* fix(config-api): asset mgt endpoint fixes

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset upload mgt ehancement and fido

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset upload mgt ehancement and fido

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset upload mgt ehancement and fido

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): asset upload

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): lock review comments

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock code review comments

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock master renamed to lock server

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock master renamed to lock server

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock master renamed to lock server

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock master renamed to lock server

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): fido2 delete functionality

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): acr validation

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): doc(config-api): IDP schema attribute descriptions #9187

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): uploading assets via API generates 2 entries #9178

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset mgt, fido and IDP changes

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): fido2 device endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): fido2 endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): fido2 endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): resolved sonar review issues

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sonar review comment fix

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): swagger spec

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): saml config attribute description

Signed-off-by: pujavs <pujas.works@gmail.com>

* doc(config-api): added SAML attribute description

Signed-off-by: pujavs <pujas.works@gmail.com>

* doc(config-api): added SAML attribute description

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(jans-lock): code review comment fix isssue#9305

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(jans-lock): code review comment fix isssue#9305

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock review point

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(lock): code review comment

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(lock): code review comment

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): sync with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): lock endpoint fixes and SAML IDP NPE

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset enhancement

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): implement timer for asset mgt to fetch and deploy assets forconfig-api #9403

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): scope validation issue #9426

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-api): asset delete error fix

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): sysnc with main

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(config-ap): lock audit endpoint parameter declaration error#9460

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): client token functionality

Signed-off-by: pujavs <pujas.works@gmail.com>

* fix(Config-api): lock audit endpoint path param rectification

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): clint token endpoint - wip

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): clint token endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): client token endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): client token endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): token endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): token endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): token endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session ednpoint wip

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session ednpoint wip

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session and token endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session and fido2 endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* test(config-api): marked session failing test case

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset mgt dir mapping changes wip

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset mgt dir changes

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset mgt changes for dir

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset mgt endpoint -wip

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): asset mgt endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): custom asset mgt wip

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): custom asset mgt

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): custom asset mgt

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session endpoint changes to remove sessionId

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api) session endpoint changes to hide id

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api) session endpoint changes to hide id

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session endpoint mgt

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session enhancement for removing id

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session endpoint changes to remove session id

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session endpoint changes to remove session id

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session endpoint changes to remove session id

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session endpoint changes to remove session id

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): search fieldValuePair enhancement

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): search fieldValuePair enhancement

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session field filter enhancement - wip

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session field search enhancement wip

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session endpoint search enhancemnt

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session endpoint search enhancemnt

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session endpoint search enhancement

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session and token endpoint enhacement

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session and token search enhancement

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): session search changes for session attribute

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): fido2 search endpoint

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): fido2 entry search

Signed-off-by: pujavs <pujas.works@gmail.com>

* feat(config-api): pagination implemented in fido2, session and token endpoints

Signed-off-by: pujavs <pujas.works@gmail.com>

---------

Signed-off-by: pujavs <pujas.works@gmail.com>
Co-authored-by: YuriyZ <yzabrovarniy@gmail.com>
  • Loading branch information
2 people authored and imShakil committed Oct 28, 2024
1 parent 7aec0a7 commit d965166
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 52 deletions.
50 changes: 24 additions & 26 deletions jans-config-api/docs/jans-config-api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7644,9 +7644,7 @@ paths:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SessionId'
$ref: '#/components/schemas/SessionPagedResult'
examples:
Response json example:
description: Response json example
Expand Down Expand Up @@ -9215,20 +9213,20 @@ components:
type: string
selected:
type: boolean
whitePagesCanView:
userCanView:
type: boolean
adminCanView:
type: boolean
adminCanEdit:
type: boolean
userCanEdit:
type: boolean
userCanView:
type: boolean
adminCanView:
type: boolean
adminCanAccess:
type: boolean
userCanAccess:
type: boolean
whitePagesCanView:
type: boolean
baseDn:
type: string
PatchRequest:
Expand Down Expand Up @@ -11630,10 +11628,10 @@ components:
ttl:
type: integer
format: int32
opbrowserState:
type: string
persisted:
type: boolean
opbrowserState:
type: string
SessionIdAccessMap:
type: object
properties:
Expand All @@ -11643,6 +11641,22 @@ components:
type: boolean
xml:
name: map
SessionPagedResult:
type: object
properties:
start:
type: integer
format: int32
totalEntriesCount:
type: integer
format: int32
entriesCount:
type: integer
format: int32
entries:
type: array
items:
$ref: '#/components/schemas/SessionId'
User:
type: object
properties:
Expand Down Expand Up @@ -11701,22 +11715,6 @@ components:
type: array
items:
$ref: '#/components/schemas/UserAuthenticator'
SessionPagedResult:
type: object
properties:
start:
type: integer
format: int32
totalEntriesCount:
type: integer
format: int32
entriesCount:
type: integer
format: int32
entries:
type: array
items:
$ref: '#/components/schemas/SessionId'
TokenAttributes:
type: object
properties:
Expand Down
11 changes: 8 additions & 3 deletions jans-config-api/plugins/docs/fido2-plugin-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,17 @@ paths:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Fido2RegistrationEntry'
$ref: '#/components/schemas/Fido2RegistrationEntryPagedResult'
examples:
Response example:
description: Response example
value: |
{
"start": 0,
"totalEntriesCount": 3,
"entriesCount": 3,
"entries": [
{
"dn": "jansId=1c88c1cb-8e32-4b79-b244-c9f677ca5654,ou=fido2_register,inum=1e73f801-22c2-4c19-a757-f96a87a5c713,ou=people,o=jans",
"id": "1c88c1cb-8e32-4b79-b244-c9f677ca5654",
"challange": "2vCSaPMIt4tZpkO8_rDG-v3QoXBYMB1aqCAXFgA4q0Y",
Expand Down Expand Up @@ -321,6 +324,8 @@ paths:
"registrationStatus": "registered",
"baseDn": "jansId=6e196a5d-122b-4f06-8ff8-6f41b32bc2a6,ou=fido2_register,inum=1e73f801-22c2-4c19-a757-f96a87a5c713,ou=people,o=jans"
}
]
}
"401":
description: Unauthorized
"500":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.media.Schema;
Expand All @@ -28,7 +27,6 @@
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import java.util.List;

import org.slf4j.Logger;

Expand Down Expand Up @@ -106,7 +104,7 @@ public Response getFido2RegistrationEntryById(
"Fido2 - Registration" }, security = @SecurityRequirement(name = "oauth2", scopes = {
Constants.FIDO2_CONFIG_READ_ACCESS }))
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Ok", content = @Content(mediaType = MediaType.APPLICATION_JSON, array = @ArraySchema(schema = @Schema(implementation = Fido2RegistrationEntry.class)), examples = @ExampleObject(name = "Response example", value = "example/fido2/get-all-fido2-data.json"))),
@ApiResponse(responseCode = "200", description = "Ok", content = @Content(mediaType = MediaType.APPLICATION_JSON, schema = @Schema(implementation = Fido2RegistrationEntryPagedResult.class), examples = @ExampleObject(name = "Response example", value = "example/fido2/search-fido2-registration-data.json"))),
@ApiResponse(responseCode = "401", description = "Unauthorized"),
@ApiResponse(responseCode = "500", description = "InternalServerError") })
@GET
Expand All @@ -115,7 +113,8 @@ public Response getFido2RegistrationEntryById(
public Response findAllRegisteredByUsername(
@Parameter(description = "User name") @PathParam("username") @NotNull String username) {
logger.info("FIDO2 registration entries by username.");
List<Fido2RegistrationEntry> entries = fido2RegistrationService.findAllRegisteredByUsername(username);
checkNotNull(username, "User name");
PagedResult<Fido2RegistrationEntry> entries = fido2RegistrationService.getFido2RegisteredByUsername(username);
logger.info("FIDO2 registration entries by entries:{}", entries);
return Response.ok(entries).build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io.jans.as.model.config.StaticConfiguration;
import io.jans.configapi.configuration.ConfigurationFactory;
import io.jans.configapi.core.util.DataUtil;
import io.jans.configapi.plugin.fido2.util.Constants;
import io.jans.configapi.util.ApiConstants;
import io.jans.model.SearchRequest;
import io.jans.orm.PersistenceEntryManager;
Expand Down Expand Up @@ -41,6 +42,9 @@
@ApplicationScoped
public class Fido2RegistrationService {

private static final String JANS_STATUS = "jansStatus";
private static final String PERSON_INUM = "personInum";

@Inject
private Logger log;

Expand Down Expand Up @@ -93,11 +97,11 @@ public PagedResult<Fido2RegistrationEntry> searchFido2Registration(SearchRequest
Filter displayNameFilter = Filter.createSubstringFilter("displayName", null, targetArray, null);
Filter descriptionFilter = Filter.createSubstringFilter("jansRegistrationData", null, targetArray,
null);
Filter statusFilter = Filter.createSubstringFilter("jansStatus", null, targetArray, null);
Filter statusFilter = Filter.createSubstringFilter(JANS_STATUS, null, targetArray, null);
Filter notificationConfFilter = Filter.createSubstringFilter("jansDeviceNotificationConf", null,
targetArray, null);
Filter deviceDataFilter = Filter.createSubstringFilter("jansDeviceData", null, targetArray, null);
Filter personInumFilter = Filter.createSubstringFilter("personInum", null, targetArray, null);
Filter personInumFilter = Filter.createSubstringFilter(PERSON_INUM, null, targetArray, null);
Filter inumFilter = Filter.createSubstringFilter("jansId", null, targetArray, null);

filters.add(Filter.createORFilter(displayNameFilter, descriptionFilter, statusFilter,
Expand All @@ -115,7 +119,8 @@ public PagedResult<Fido2RegistrationEntry> searchFido2Registration(SearchRequest
getDnFido2RegistrationEntry(null), persistenceEntryManager);
}

fieldValueFilters.add(Filter.createORFilter(filters));
searchFilter = Filter.createANDFilter(Filter.createORFilter(filters),
Filter.createANDFilter(fieldValueFilters));

log.info(" Final - Fido2Registration searchFilter:{}", searchFilter);

Expand All @@ -142,11 +147,41 @@ public List<Fido2RegistrationEntry> findAllRegisteredByUsername(String username)
return Collections.emptyList();
}

Filter searchFilter = Filter.createANDFilter(Filter.createEqualityFilter("personInum", userInum),
Filter.createEqualityFilter("jansStatus", Fido2RegistrationStatus.registered.getValue()));
Filter searchFilter = Filter.createANDFilter(Filter.createEqualityFilter(PERSON_INUM, userInum),
Filter.createEqualityFilter(JANS_STATUS, Fido2RegistrationStatus.registered.getValue()));

log.info("Fido2 Registered by searchFilter:{}", searchFilter);
return persistenceEntryManager.findEntries(getDnFido2RegistrationEntry(baseDn), Fido2RegistrationEntry.class,
searchFilter);
}

public PagedResult<Fido2RegistrationEntry> getFido2RegisteredByUsername(String username) {
if (log.isInfoEnabled()) {
log.info("Fetch Fido2 Registered by username:{}", escapeLog(username));
}
PagedResult<Fido2RegistrationEntry> fido2RegistrationEntry = null;
String userInum = userFido2Srv.getUserInum(username);
log.info("Find Fido2 Registered by userInum:{}", userInum);
if (userInum == null) {
return fido2RegistrationEntry;
}

String baseDn = getBaseDnForFido2RegistrationEntries(userInum);
log.info("Find Fido2 Registered by baseDn:{}", baseDn);
if (persistenceEntryManager.hasBranchesSupport(baseDn) && !containsBranch(baseDn)) {
return fido2RegistrationEntry;
}

Filter searchFilter = Filter.createANDFilter(Filter.createEqualityFilter(PERSON_INUM, userInum),
Filter.createEqualityFilter(JANS_STATUS, Fido2RegistrationStatus.registered.getValue()));

log.info("Fido2 Registered by searchFilter:{}", searchFilter);

return persistenceEntryManager.findPagedEntries(getDnFido2RegistrationEntry(baseDn),
Fido2RegistrationEntry.class, searchFilter, null, Constants.JANSID, SortOrder.ASCENDING,
Integer.parseInt(ApiConstants.DEFAULT_LIST_START_INDEX),
Integer.parseInt(ApiConstants.DEFAULT_LIST_SIZE), getRecordMaxCount());

log.info("Find Fido2 Registered by searchFilter:{}", searchFilter);
return persistenceEntryManager.findEntries(getDnFido2RegistrationEntry(null), Fido2RegistrationEntry.class, searchFilter);
}

public String getBaseDnForFido2RegistrationEntries(String userInum) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import io.jans.orm.model.PagedResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import io.swagger.v3.oas.annotations.media.Schema;
Expand Down Expand Up @@ -53,16 +52,22 @@ private class SessionPagedResult extends PagedResult<SessionId> {
"Auth - Session Management" }, security = @SecurityRequirement(name = "oauth2", scopes = {
ApiAccessConstants.JANS_AUTH_SESSION_READ_ACCESS, "revoke_session" }))
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Ok", content = @Content(mediaType = MediaType.APPLICATION_JSON, array = @ArraySchema(schema = @Schema(implementation = SessionId.class)), examples = @ExampleObject(name = "Response json example", value = "example/session/get-session.json"))),
@ApiResponse(responseCode = "200", description = "Ok", content = @Content(mediaType = MediaType.APPLICATION_JSON, schema = @Schema(implementation = SessionPagedResult.class), examples = @ExampleObject(name = "Response json example", value = "example/session/get-session.json"))),
@ApiResponse(responseCode = "401", description = "Unauthorized"),
@ApiResponse(responseCode = "500", description = "InternalServerError") })
@GET
@ProtectedApi(scopes = { ApiAccessConstants.JANS_AUTH_SESSION_READ_ACCESS }, groupScopes = {}, superScopes = {
ApiAccessConstants.SUPER_ADMIN_READ_ACCESS })
public Response getAllSessions() {
final List<SessionId> sessions = sessionService.getSessions();
logger.debug("sessions:{}", sessions);
return Response.ok(sessions).build();

SearchRequest searchReq = createSearchRequest(sessionService.getDnForSession(null), null, ApiConstants.JANSID,
ApiConstants.ASCENDING, Integer.parseInt(ApiConstants.DEFAULT_LIST_START_INDEX),
Integer.parseInt(ApiConstants.DEFAULT_LIST_SIZE), null, null, this.getMaxCount(), null,
SessionId.class);

SessionPagedResult sessionPagedResult = searchSession(searchReq);
logger.info("Session fetched sessionPagedResult:{}", sessionPagedResult);
return Response.ok(sessionPagedResult).build();
}

@Operation(summary = "Search session", description = "Search session", operationId = "search-session", tags = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public class TokenResource extends ConfigBaseResource {
private class TokenEntityPagedResult extends PagedResult<TokenEntity> {
};

private static final String TOKEN_NOT_FOUND = "Token identified by %s not found.";

@Inject
TokenService tokenService;

Expand Down Expand Up @@ -71,7 +73,9 @@ public Response getTokenById(
checkNotNull(tknCde, ApiConstants.TOKEN_CODE);

TokenEntity tokenEntity = this.tokenService.getTokenEntityByCode(tknCde);

if (tokenEntity == null) {
throwNotFoundException("Not Found", String.format(TOKEN_NOT_FOUND, tknCde));
}
logger.info("Token fetched tokenEntity:{}", tokenEntity);
return Response.ok(tokenEntity).build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public class SessionService {

private static final String SID_MSG = "Get Session by sid:{}";
private static final String SID_ERROR = "Failed to load session entry with sid ";
private static final List<String> SESSION_ATTR = Arrays.asList("acr","scope","auth_user","client_id","acr_values","redirect_uri","response_type");
private static final List<String> SESSION_ATTR = Arrays.asList("acr", "scope", "auth_user", "client_id",
"acr_values", "redirect_uri", "response_type");

@Inject
private Logger logger;
Expand Down Expand Up @@ -149,8 +150,8 @@ public PagedResult<SessionId> searchSession(SearchRequest searchRequest) {
persistenceEntryManager);
}

fieldValueFilters.add(Filter.createORFilter(filters));
searchFilter = Filter.createANDFilter(fieldValueFilters);
searchFilter = Filter.createANDFilter(Filter.createORFilter(filters),
Filter.createANDFilter(fieldValueFilters));

logger.info("Session searchFilter:{}", searchFilter);

Expand Down Expand Up @@ -299,14 +300,14 @@ private List<FieldFilterData> modifyFilter(List<FieldFilterData> fieldFilterData
for (FieldFilterData fieldFilterData : fieldFilterDataList) {
if (fieldFilterData != null && StringUtils.isNotBlank(fieldFilterData.getField())) {
String field = fieldFilterData.getField();
if(StringUtils.isBlank(field)) {
if (StringUtils.isBlank(field)) {
continue;
}
if ("jansUsrDN".equalsIgnoreCase(field)) {
// get Dn
fieldFilterData.setValue(getDnForUser(fieldFilterData.getValue()));
}else if(SESSION_ATTR.contains(field)) {
fieldFilterData.setField("jansSessAttr."+field);
} else if (SESSION_ATTR.contains(field)) {
fieldFilterData.setField("jansSessAttr." + field);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public TokenEntity getTokenEntityByCode(String tknCde) {
tokenEntity = persistenceEntryManager.find(TokenEntity.class, getDnForTokenEntity(tknCde));
} catch (Exception ex) {
logger.error("Failed to get Token identified by tknCde:{" + tknCde + "}", ex);
return tokenEntity;
}
return tokenEntity;
}
Expand Down

0 comments on commit d965166

Please sign in to comment.