Skip to content

Commit 71bb392

Browse files
authored
Merge branch 'geonetwork:main' into main.delete.metadata.without.backup.option
2 parents 17b4ed4 + 65f054d commit 71bb392

83 files changed

Lines changed: 560 additions & 178 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

auditable/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.geonetwork-opensource</groupId>
88
<artifactId>geonetwork</artifactId>
9-
<version>4.4.7-SNAPSHOT</version>
9+
<version>4.4.8-SNAPSHOT</version>
1010
</parent>
1111

1212
<!-- =========================================================== -->

cachingxslt/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<parent>
3232
<groupId>org.geonetwork-opensource</groupId>
3333
<artifactId>geonetwork</artifactId>
34-
<version>4.4.7-SNAPSHOT</version>
34+
<version>4.4.8-SNAPSHOT</version>
3535
</parent>
3636

3737

common/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<parent>
3232
<groupId>org.geonetwork-opensource</groupId>
3333
<artifactId>geonetwork</artifactId>
34-
<version>4.4.7-SNAPSHOT</version>
34+
<version>4.4.8-SNAPSHOT</version>
3535
</parent>
3636

3737

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<parent>
2828
<artifactId>geonetwork</artifactId>
2929
<groupId>org.geonetwork-opensource</groupId>
30-
<version>4.4.7-SNAPSHOT</version>
30+
<version>4.4.8-SNAPSHOT</version>
3131
</parent>
3232
<modelVersion>4.0.0</modelVersion>
3333

core/src/main/java/org/fao/geonet/kernel/search/EsSearchManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public class EsSearchManager implements ISearchManager {
142142
FIELDLIST_RELATED_SCRIPTED = ImmutableMap.<String, String>builder()
143143
// Elasticsearch scripted field to get the first overview url. Scripted fields must return single values.
144144
.put("overview", "return params['_source'].overview == null ? [] : params['_source'].overview.stream().map(f -> f.url).findFirst().orElse('');")
145-
.put("overview_data", "return params['_source'].overview == null ? [] : params['_source'].overview.stream().map(f -> f.data).findFirst().orElse('');")
145+
.put("overview_data", "return params['_source'].overview == null ? [] : params['_source'].overview.stream().map(f -> f.data).filter(Objects::nonNull).findFirst().orElse('');")
146146
.build();
147147
}
148148

core/src/main/java/org/fao/geonet/kernel/security/openidconnect/bearer/AudienceAccessTokenValidator.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ public class AudienceAccessTokenValidator implements AccessTokenValidator {
5353
@Autowired
5454
OIDCConfiguration oidcConfiguration;
5555

56-
/**
57-
* "aud" must be our client id
58-
* OR "azp" must be our client id (or, if its a list, contain our client id)
56+
/**
57+
* "aud" must be our client id (or, if its a list, contain our client id)
58+
* OR "azp" must be our client id
5959
* OR "appid" must be our client id.
6060
* <p>
6161
* Otherwise, its a token not for us...
@@ -68,8 +68,9 @@ public class AudienceAccessTokenValidator implements AccessTokenValidator {
6868
*/
6969
@Override
7070
public void verifyToken(Map claimsJWT, Map userInfoClaims) throws Exception {
71-
if ((claimsJWT.get(AUDIENCE_CLAIM_NAME) != null)
72-
&& claimsJWT.get(AUDIENCE_CLAIM_NAME).equals(oidcConfiguration.getClientId())) {
71+
//azp from keycloak
72+
if ((claimsJWT.get(KEYCLOAK_AUDIENCE_CLAIM_NAME) != null)
73+
&& claimsJWT.get(KEYCLOAK_AUDIENCE_CLAIM_NAME).equals(oidcConfiguration.getClientId())) {
7374
return;
7475
}
7576

@@ -78,15 +79,15 @@ public void verifyToken(Map claimsJWT, Map userInfoClaims) throws Exception {
7879
return; //azure specific
7980
}
8081

81-
//azp - keycloak
82-
Object azp = claimsJWT.get(KEYCLOAK_AUDIENCE_CLAIM_NAME);
83-
if (azp != null) {
84-
if (azp instanceof String) {
85-
if (((String) azp).equals(oidcConfiguration.getClientId()))
82+
//aud
83+
Object aud = claimsJWT.get(AUDIENCE_CLAIM_NAME);
84+
if (aud != null) {
85+
if (aud instanceof String) {
86+
if (((String) aud).equals(oidcConfiguration.getClientId()))
8687
return;
87-
} else if (azp instanceof List) {
88-
List azps = (List) azp;
89-
for (Object o : azps) {
88+
} else if (aud instanceof List) {
89+
List auds = (List) aud;
90+
for (Object o : auds) {
9091
if ((o instanceof String) && (o.equals(oidcConfiguration.getClientId()))) {
9192
return;
9293
}

csw-server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<parent>
2828
<artifactId>geonetwork</artifactId>
2929
<groupId>org.geonetwork-opensource</groupId>
30-
<version>4.4.7-SNAPSHOT</version>
30+
<version>4.4.8-SNAPSHOT</version>
3131
</parent>
3232
<modelVersion>4.0.0</modelVersion>
3333

datastorages/cmis/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<artifactId>gn-datastorages</artifactId>
3030
<groupId>org.geonetwork-opensource.datastorage</groupId>
31-
<version>4.4.7-SNAPSHOT</version>
31+
<version>4.4.8-SNAPSHOT</version>
3232
</parent>
3333
<modelVersion>4.0.0</modelVersion>
3434

datastorages/jcloud/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<artifactId>gn-datastorages</artifactId>
3030
<groupId>org.geonetwork-opensource.datastorage</groupId>
31-
<version>4.4.7-SNAPSHOT</version>
31+
<version>4.4.8-SNAPSHOT</version>
3232
</parent>
3333
<modelVersion>4.0.0</modelVersion>
3434

datastorages/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<artifactId>geonetwork</artifactId>
3030
<groupId>org.geonetwork-opensource</groupId>
31-
<version>4.4.7-SNAPSHOT</version>
31+
<version>4.4.8-SNAPSHOT</version>
3232
</parent>
3333
<modelVersion>4.0.0</modelVersion>
3434

0 commit comments

Comments
 (0)