Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

271 security updates #214

Merged
merged 24 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e0d2b0f
Update AgpOutputBroker.java
mhogeweg Sep 7, 2023
57ab8c8
harvest full metadata from ArcGIS Server services and layers
mhogeweg Sep 13, 2023
83ec07c
#209 Portal Input broker- file name should be title in place of item id
as0050629 Sep 19, 2023
53fa4d5
Removed /item in elastic search url to support 8.x
as0050629 Sep 21, 2023
295915a
Read json from _source if _source._json not available
as0050629 Sep 28, 2023
af76395
use full metadata vs item info from ArcGIS Server services
mhogeweg Sep 28, 2023
dfb3c3c
Merge branch 'f/2.7.1' of https://github.com/Esri/geoportal-server-ha…
mhogeweg Sep 28, 2023
9c6a260
update sub-layer metadata in ArcGIS Online/Portal
mhogeweg Oct 12, 2023
8d4597f
update terminate function to count actual deletes
mhogeweg Oct 18, 2023
500c9ff
Revert "update terminate function to count actual deletes"
as0050629 Nov 1, 2023
e4cbc1e
Update version to 2.7.1
as0050629 Nov 1, 2023
4670ef2
Update version to 2.7.1
as0050629 Nov 1, 2023
93e1ee9
Update version to 2.7.1
as0050629 Nov 1, 2023
1217ebc
Revert "Revert "update terminate function to count actual deletes""
as0050629 Nov 1, 2023
3773fc2
#204 Added oAuth Token for AGOL Sublayer metadata
as0050629 Nov 3, 2023
d64f2a5
#204 Added oAuth Token, fixed cors error
as0050629 Nov 3, 2023
91dc0e7
#204 get featureLayer token using oAuthToken
as0050629 Nov 3, 2023
98c2baa
#204 fix status update
as0050629 Nov 20, 2023
2e44b95
#204 Comment test url
as0050629 Nov 20, 2023
7cee1e6
layer harvest
mhogeweg Nov 20, 2023
b083370
Changed system.out to Log statements
as0050629 Nov 30, 2023
1d916d5
update AgpOutputBroker as sub-layer harvest was failing
mhogeweg Dec 8, 2023
d44cbe4
Merge branch 'f/2.7.1' of https://github.com/Esri/geoportal-server-ha…
mhogeweg Dec 8, 2023
06f7500
Fixed security updates
as0050629 Dec 12, 2023
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To report an issue, please go to [issues](https://github.com/Esri/geoportal-serv
The nature of the Harvester application is, as the name suggests, to harvest metadata from whatever web endpoints it is provided. The list(s) of endpoints to download metadata from can also be provided by external entities over the internet. Neither the metadata being harvested nor the list(s) of endpoints provided by external entities are vetted or checked by the Harvester. **Users who wish to limit the scope of the Harvester's reach should configure the network or machine where the Harvester is located with allow lists or deny lists of web endpoints to prevent the Harvester from reaching undesirable locations.**

## Releases and Downloads
- 2.7.0 - June 13, 2021, click [here](https://github.com/Esri/geoportal-server-harvester/releases/tag/v2.7.0) for release notes and downloads.
- 2.7.1 - June 13, 2021, click [here](https://github.com/Esri/geoportal-server-harvester/releases/tag/v2.7.1) for release notes and downloads.
- 2.6.5 - July 13, 2021, click [here](https://github.com/Esri/geoportal-server-harvester/releases/tag/v2.6.5) for release notes and downloads.
- 2.6.4 - July 8, 2020, click [here](https://github.com/Esri/geoportal-server-harvester/releases/tag/v2.6.4) for release notes and downloads.

Expand Down
2 changes: 1 addition & 1 deletion geoportal-SDK/geoportal-harvester-api-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-SDK</artifactId>
<version>2.7.0</version>
<version>2.7.1</version>
</parent>
<artifactId>harvester-api-base</artifactId>
<name>Esri :: Geoportal Server :: Harvester :: Api Base</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public Set<MimeType> getContentType() {
public String getId() {
return baseRef.getId();
}
@Override
public String getTitle() {
return baseRef.getTitle();
}

@Override
public String getFetchableId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class SimpleDataReference implements DataReference {
private final URI brokerUri;
private final String brokerName;
private final String id;
private String title = "";
private final Date lastModifiedDate;
private final URI sourceUri;
private final String inputBrokerRef;
Expand All @@ -54,13 +55,24 @@ public class SimpleDataReference implements DataReference {
* @param taskRef task reference of <code>null</code> if ad-hoc
*/
public SimpleDataReference(URI brokerUri, String brokerName, String id, Date lastModifiedDate, URI sourceUri, String inputBrokerRef, String taskRef) {
this.brokerUri = brokerUri;
this.brokerName = brokerName;
this.id = id;
this.lastModifiedDate = lastModifiedDate;
this.sourceUri = sourceUri;
this.inputBrokerRef = inputBrokerRef;
this.taskRef = taskRef;
}

public SimpleDataReference(URI brokerUri, String brokerName, String id, Date lastModifiedDate, URI sourceUri, String inputBrokerRef, String taskRef,String title) {
this.brokerUri = brokerUri;
this.brokerName = brokerName;
this.id = id;
this.lastModifiedDate = lastModifiedDate;
this.sourceUri = sourceUri;
this.inputBrokerRef = inputBrokerRef;
this.taskRef = taskRef;
this.title = title;
}

/**
Expand Down Expand Up @@ -101,6 +113,11 @@ public Date getLastModifiedDate() {
public URI getSourceUri() {
return sourceUri;
}

@Override
public String getTitle() {
return title;
}

@Override
public byte[] getContent(MimeType...mimeType) throws IOException {
Expand Down
4 changes: 2 additions & 2 deletions geoportal-SDK/geoportal-harvester-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<parent>
<artifactId>geoportal-SDK</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.7.0</version>
<version>2.7.1</version>
</parent>
<artifactId>harvester-api</artifactId>
<name>Esri :: Geoportal Server :: Harvester :: Api</name>
<description>Definitions of all basic elements of the Harvester (interfaces, final classes, etc.).</description>
<version>2.7.0</version>
<version>2.7.1</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,6 @@ public interface DataReference extends Serializable, DataContent {
* @return task reference of <code>null</code> if ad-hoc
*/
String getTaskRef();

String getTitle();
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ public static enum ArgumentType {
/** temporal type */
temporal,
/** periodical */
periodical
periodical,
button,
hidden

}

/**
Expand Down Expand Up @@ -224,7 +227,7 @@ public String toString() {
}
}

/**
/**
* String argument.
*/
public static class StringArgument extends ArgumentBase<String> {
Expand Down Expand Up @@ -272,6 +275,44 @@ public ArgumentType getType() {
}
}

/**
* Button argument.
*/
public static class ButtonArgument extends ArgumentBase<String> {

/**
* Creates instance of the argument.
* @param name type
* @param label label
* @param required <code>true</code> if argument is required
*/
public ButtonArgument(String name, String label, boolean required) {
super(name, label, required);
}
@Override
public ArgumentType getType() {
return ArgumentType.button;
}
}

/**
* Button argument.
*/
public static class HiddenArgument extends ArgumentBase<String> {
/**
* Creates instance of the argument.
* @param name type
* @param label label
*/
public HiddenArgument(String name, String label) {
super(name, label);
}
@Override
public ArgumentType getType() {
return ArgumentType.hidden;
}
}

/**
* String argument.
*/
Expand Down
2 changes: 1 addition & 1 deletion geoportal-SDK/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>geoportal-harvester</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.7.0</version>
<version>2.7.1</version>
</parent>
<artifactId>geoportal-SDK</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-application/geoportal-harvester-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.esri.geoportal</groupId>
<artifactId>geoportal-application</artifactId>
<version>2.7.0</version>
<version>2.7.1</version>
</parent>
<artifactId>geoportal-harvester-cli</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion geoportal-application/geoportal-harvester-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>geoportal-application</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.7.0</version>
<version>2.7.1</version>
</parent>
<artifactId>geoportal-harvester-engine</artifactId>
<name>Esri :: Geoportal Server :: Harvester :: Application :: Engine</name>
Expand Down
6 changes: 3 additions & 3 deletions geoportal-application/geoportal-harvester-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>geoportal-application</artifactId>
<groupId>com.esri.geoportal</groupId>
<version>2.7.0</version>
<version>2.7.1</version>
</parent>
<artifactId>geoportal-harvester-war</artifactId>
<packaging>war</packaging>
Expand All @@ -13,7 +13,7 @@

<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<spring.version>5.3.24</spring.version>
<spring.version>5.3.27</spring.version>
<springsecurity.version>5.3.10.RELEASE</springsecurity.version>
</properties>

Expand Down Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.210</version>
<version>2.2.220</version>
</dependency>

<!-- Spring Security -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import static com.esri.geoportal.commons.utils.CrlfUtils.formatForLog;
import com.esri.geoportal.harvester.api.defs.UITemplate;
import com.esri.geoportal.harvester.engine.services.Engine;
import com.esri.geoportal.harvester.engine.services.TemplatesService;
import java.util.List;
import java.util.Locale;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
Expand Down Expand Up @@ -181,6 +184,8 @@ public UITemplate[] listInboundConnectors() {
@RequestMapping(value = "/rest/harvester/connectors/outbound", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public UITemplate[] listOutboundConnectors() {
LOG.debug(String.format("GET /rest/harvester/connectors/outbound"));
TemplatesService srv1 = engine.getTemplatesService();
List<UITemplate> temp2= srv1.getOutboundConnectorTemplates(Locale.US);
return engine.getTemplatesService().getOutboundConnectorTemplates(LocaleContextHolder.getLocale()).toArray(new UITemplate[0]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,18 @@ define(["dojo/_base/declare",
"dijit/Dialog",
"dijit/ConfirmDialog",
"hrv/rest/Brokers",
"hrv/ui/brokers/BrokerEditorPane"
"hrv/ui/brokers/BrokerEditorPane",
"esri/IdentityManager",
"esri/arcgis/Portal",
"esri/config",
],
function(declare,
_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,
i18n,template,
lang,string,topic,on,json,
Dialog,ConfirmDialog,
BrokersREST,BrokerEditorPane
BrokersREST,BrokerEditorPane,
esriId, arcgisPortal,esriConfig
){

return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin],{
Expand Down Expand Up @@ -71,23 +75,50 @@ define(["dojo/_base/declare",

// listen to "submit" button click
this.own(on(brokerEditorPane,"submit",lang.hitch(this, function(evt){
var brokerDefinition = evt.brokerDefinition;

// use API to update broker
BrokersREST.update(brokerDefinition.uuid,json.stringify(brokerDefinition)).then(
lang.hitch({brokerEditorPane: brokerEditorPane, brokerEditorDialog: brokerEditorDialog, self: this},function(){
topic.publish("msg"); // clear any former errors
this.brokerEditorDialog.destroy();
this.brokerEditorPane.destroy();
this.self.load();
}),
lang.hitch(this,function(error){
console.debug(error);
topic.publish("msg", new Error(this.i18n.brokers.errors.creating));
})
);
})));

var brokerDefinition = evt.brokerDefinition;
var brokerDefinitionProp = evt.brokerDefinition.properties;
var portalUrl = brokerDefinitionProp["agp-host-url"] ;

if(brokerDefinitionProp["agp-oauth"]=== "true"){
esriId.getCredential(portalUrl,{oAuthPopupConfirmation:false}).then(
lang.hitch(this,function(credential){
var token = credential.token;
brokerDefinitionProp["agp-token"]= token;

// use API to update broker
BrokersREST.update(brokerDefinition.uuid,json.stringify(brokerDefinition)).then(
lang.hitch({brokerEditorPane: brokerEditorPane, brokerEditorDialog: brokerEditorDialog, self: this},function(){
topic.publish("msg"); // clear any former errors
this.brokerEditorDialog.destroy();
this.brokerEditorPane.destroy();
//TODO reload Broker
// this.self.load();
}),
lang.hitch(this,function(error){
console.debug(error);
topic.publish("msg", new Error(this.i18n.brokers.errors.creating));
})
);
}));
}
else
{
brokerDefinitionProp["agp-token"]= "";
// use API to update broker
BrokersREST.update(brokerDefinition.uuid,json.stringify(brokerDefinition)).then(
lang.hitch({brokerEditorPane: brokerEditorPane, brokerEditorDialog: brokerEditorDialog, self: this},function(){
topic.publish("msg"); // clear any former errors
this.brokerEditorDialog.destroy();
this.brokerEditorPane.destroy();
this.self.load();
}),
lang.hitch(this,function(error){
console.debug(error);
topic.publish("msg", new Error(this.i18n.brokers.errors.creating));
}));
}
})));

brokerEditorDialog.show();
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ define(["dojo/_base/declare",
this.updateArgumentsForm(this.connectorTemplates[type].arguments);
},

onOAuth:function()
{
alert("hello");
},
_onSubmit: function() {
if (this.formWidget.validate()) {
var values = this.formWidget.getValues();
Expand Down
Loading
Loading