Skip to content

Commit

Permalink
Merge branch 'efs-development' into CMR-9161
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerHeald1 committed Jun 21, 2023
2 parents 764b20e + 7f9d4ab commit 37ae4e4
Show file tree
Hide file tree
Showing 23 changed files with 12,364 additions and 37,308 deletions.
2 changes: 1 addition & 1 deletion browse-scaler/src/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18
FROM node:16

# Create and define the node_modules's cache directory.
RUN mkdir /usr/src/cache
Expand Down
2 changes: 1 addition & 1 deletion browse-scaler/src/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18
FROM node:16

WORKDIR /app
RUN mkdir /app/artifacts
Expand Down
13,911 changes: 645 additions & 13,266 deletions browse-scaler/src/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion browse-scaler/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"main": "index.js",
"type": "module",
"dependencies": {
"@aws-sdk/client-ssm": "^3.211.0",
"@aws-sdk/client-ssm": "^3.341.0",
"axios": "^0.24.0",
"node-fetch": "^2.6.7",
"redis": "^2.8.0",
Expand Down
35,340 changes: 11,447 additions & 23,893 deletions graph-db/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions graph-db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
],
"license": "ISC",
"dependencies": {
"@aws-sdk/client-sqs": "^3.211.0",
"@aws-sdk/client-ssm": "^3.211.0",
"@aws-sdk/client-sqs": "^3.347.1",
"@aws-sdk/client-ssm": "^3.347.1",
"array-foreach-async": "^1.0.1",
"axios": "^0.24.0",
"axios-retry": "^3.3.1",
Expand All @@ -58,7 +58,7 @@
},
"resolutions": {
"file-type": "16.5.4",
"fast-xml-parser": "4.1.2",
"fast-xml-parser": "4.2.4",
"luxon": "1.28.1",
"simple-git": "3.16.0"
}
Expand Down
17 changes: 8 additions & 9 deletions other/cmr-exchange/authz/resources/config/cmr-authz/config.edn
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{:auth-caching
{:jwt-public-key "{
\"kty\": \"RSA\",
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
\"e\": \"AQAB\",
\"kid\": \"edljwtpubkey_sit\"
}"
:init {}
{:init {}
:ttl
{:minutes 60}
:lru
Expand All @@ -19,8 +13,13 @@
:relative
{:root
{:url "/access-control"}}}}
:edl
{:rest
:edl {:jwt {:public {:key "{
\"kty\": \"RSA\",
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
\"e\": \"AQAB\",
\"kid\": \"edljwtpubkey_sit\"
}"}}
:rest
{:protocol "https"
:host "sit.urs.earthdata.nasa.gov"}}
:echo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

(defn get-jwt-public-key
[system]
(get-in (get-cfg system) [:auth-caching :jwt-public-key]))
(get-in (get-cfg system) [:cmr :edl :jwt :public :key]))

(defn get-edl-username
[system]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{:api-version "v3"
:default-content-type "json"
:auth-caching {:jwt-public-key "{
\"kty\": \"RSA\",
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
\"e\": \"AQAB\",
\"kid\": \"edljwtpubkey_sit\"
}"
:init {}
:auth-caching {:init {}
:ttl {:minutes 60}
:lru {:threshold 1000}
:dumpfile "data/cache/authz-dump.edn"}
Expand All @@ -19,7 +13,13 @@
:relative {:root {:url "/access-control"}}}}
:concept {
:variable {:version "1.1"}}
:edl {:rest
:edl {:jwt {:public {:key "{
\"kty\": \"RSA\",
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
\"e\": \"AQAB\",
\"kid\": \"edljwtpubkey_sit\"
}"}}
:rest
{:protocol "https"
:host "sit.urs.earthdata.nasa.gov"}}
:echo {:rest {:protocol "https"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,102 +1,85 @@
{:api-version "v3"
:default-content-type "json"
:auth-caching {:jwt-public-key "{
\"kty\": \"RSA\",
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
\"e\": \"AQAB\",
\"kid\": \"edljwtpubkey_sit\"
}"
:init {}
:auth-caching {:init {}
:ttl {:minutes 60}
:lru {:threshold 1000}
:dumpfile "data/cache/authz-dump.edn"}
:concept-caching {:init {}
:ttl {:hours 24}
:dumpfile "data/cache/concept-dump.edn"}
:cmr {
:access {:control {:protocol "https"
:cmr {:access {:control {:protocol "https"
:host "cmr.sit.earthdata.nasa.gov"
:relative {:root {:url "/access-control"}}}}
:concept {:variable {:version "1.1"}}
:edl {:jwt {:public {:key "{
\"kty\": \"RSA\",
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
\"e\": \"AQAB\",
\"kid\": \"edljwtpubkey_sit\"
}"}}
:rest
{:protocol "https"
:host "sit.urs.earthdata.nasa.gov"}}
:echo {:rest {:protocol "https"
:host "cmr.sit.earthdata.nasa.gov"
:context "/legacy-services/rest"}}
:max-pagesize 2000
:service {:bridge {:protocol "https"
:host "cmr.sit.earthdata.nasa.gov"
:relative {:root {:url "/access-control"}}}}
:concept {
:variable {:version "1.1"}}
:edl {:rest
{:protocol "https"
:host "sit.urs.earthdata.nasa.gov"}}
:echo {:rest {:protocol "https"
:host "cmr.sit.earthdata.nasa.gov"
:context "/legacy-services/rest"}}
:max-pagesize 2000
:service {
:bridge {:protocol "https"
:host "cmr.sit.earthdata.nasa.gov"
:public {:protocol "https"
:host "cmr.sit.earthdata.nasa.gov"}
:relative {:root {:url "/service-bridge"}}}}
:search {:protocol "https"
:host "cmr.sit.earthdata.nasa.gov"
:relative {:root {:url "/search"}}}}
:giovanni {
:search {:protocol "https"
:host "giovanni.gsfc.nasa.gov"
:relative {:root {:url "/giovanni"}}}}
:edsc {
:search {:protocol "https"
:host "search.sit.earthdata.nasa.gov"
:relative {:root {:url "/search"}}}}
:httpd {
:port 3013
:entry-point-fn cmr.opendap.app.core/main
:route-fns {
:api cmr.opendap.app.routes.rest.core/all
:site cmr.opendap.app.routes.site/all}
:pages {
:default-title "CMR Service-Bridge"}
:base-url "/service-bridge"
:base-url-fn cmr.opendap.components.config/opendap-base-url
:docs "resources/public/docs"
:assets "resources/public/assets"
:rest-docs
{:base-url-template "%%BASE_URL%%"
:source "resources/docs/rest-api/index.md"
:outdir "resources/public/docs/service-bridge/docs/current/rest-api"}
:skip-static #{"/service-bridge/docs"}
:replace-base-url #{"/service-bridge/docs/current/rest-api"
"/service-bridge/docs/current/reference/2000-usage.html"}
:index-dirs #{"/service-bridge/docs/1.0.0/marginalia"
"/service-bridge/docs/1.0.0/reference"
"/service-bridge/docs/1.0.0/rest-api"
"/service-bridge/docs/1.5.0/marginalia"
"/service-bridge/docs/1.5.0/reference"
"/service-bridge/docs/1.5.0/rest-api"
"/service-bridge/docs/current/marginalia"
"/service-bridge/docs/current/reference"
"/service-bridge/docs/current/rest-api"}
:streaming {
:timeout 20000 ; milliseconds (20 seconds * 1000)
:heartbeat 200 ; milliseconds
}}
:logging {
:level :debug
:nss [cmr org.httpkit]
:color false}
:mission-control {
:messaging-type :core-async}
:plugin {
:jarfiles {
;; The reducer factory function must take two args: plugin name and plugin
;; type -- both of type ^String. The default reducer checks for an exact
;; string match.
:reducer-factory cmr.plugin.jar.core/create-has-plugin-type-reducer}
:registry {
:default {
:plugin-name "CMR-Plugin"
:plugin-type "service-bridge-app"
;; The fowllowing needs to be an in-JAR path to a plugin's config file,
;; which will be read once its plugin has been identifed as a plugin of
;; the desired name/type.
:config-file "config/cmr-plugin/config.edn"}
:web {
:route-keys [:httpd :route-fns]
:api-route-key :api
:site-route-key :site}}}
:public {:protocol "https"
:host "cmr.sit.earthdata.nasa.gov"}
:relative {:root {:url "/service-bridge"}}}}
:search {:protocol "https"
:host "cmr.sit.earthdata.nasa.gov"
:relative {:root {:url "/search"}}}}
:giovanni {:search {:protocol "https"
:host "giovanni.gsfc.nasa.gov"
:relative {:root {:url "/giovanni"}}}}
:edsc {:search {:protocol "https"
:host "search.sit.earthdata.nasa.gov"
:relative {:root {:url "/search"}}}}
:httpd {:port 3013
:entry-point-fn cmr.opendap.app.core/main
:route-fns {:api cmr.opendap.app.routes.rest.core/all
:site cmr.opendap.app.routes.site/all}
:pages {:default-title "CMR Service-Bridge"}
:base-url "/service-bridge"
:base-url-fn cmr.opendap.components.config/opendap-base-url
:docs "resources/public/docs"
:assets "resources/public/assets"
:rest-docs
{:base-url-template "%%BASE_URL%%"
:source "resources/docs/rest-api/index.md"
:outdir "resources/public/docs/service-bridge/docs/current/rest-api"}
:skip-static #{"/service-bridge/docs"}
:replace-base-url #{"/service-bridge/docs/current/rest-api"
"/service-bridge/docs/current/reference/2000-usage.html"}
:index-dirs #{"/service-bridge/docs/1.0.0/marginalia"
"/service-bridge/docs/1.0.0/reference"
"/service-bridge/docs/1.0.0/rest-api"
"/service-bridge/docs/1.5.0/marginalia"
"/service-bridge/docs/1.5.0/reference"
"/service-bridge/docs/1.5.0/rest-api"
"/service-bridge/docs/current/marginalia"
"/service-bridge/docs/current/reference"
"/service-bridge/docs/current/rest-api"}
:streaming {:timeout 20000 ; milliseconds (20 seconds * 1000)
:heartbeat 200}} ; milliseconds
:logging {:level :trace
:nss [cmr org.httpkit]
:color false}
:mission-control {:messaging-type :core-async}
:plugin {:jarfiles {;; The reducer factory function must take two args: plugin name and plugin
;; type -- both of type ^String. The default reducer checks for an exact
;; string match.
:reducer-factory cmr.plugin.jar.core/create-has-plugin-type-reducer}
:registry {:default {:plugin-name "CMR-Plugin"
:plugin-type "service-bridge-app"
;; The following needs to be an in-JAR path to a plugin's config file,
;; which will be read once its plugin has been identifed as a plugin of
;; the desired name/type.
:config-file "config/cmr-plugin/config.edn"}
:web {:route-keys [:httpd :route-fns]
:api-route-key :api
:site-route-key :site}}}
:vendor "cmr-service-bridge"}
4 changes: 2 additions & 2 deletions redis-utils-lib/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{:version "3.2.10"
:hash "411c604a716104f7f5a326abfad32de9cea10f15f987bec45cf86f315e9e63a0"})

(def redis-version "7")
(def redis-version "7-bullseye")

(defproject nasa-cmr/cmr-redis-utils-lib "0.1.0-SNAPSHOT"
:description "Library containing code to handling cacheing with the CMR."
Expand Down Expand Up @@ -50,7 +50,7 @@
"check-deps" ["with-profile" "lint" "ancient" ":all"]
"check-sec" ["with-profile" "security" "dependency-check"]
"eastwood" ["with-profile" "lint" "eastwood" "{:namespaces [:source-paths]}"]
"pull-docker-images" ["shell" "docker" "pull" ~(str "redis:" redis-version)]
"pull-docker-images" ["shell" "docker" "pull" ~(str "docker.io/redis:" redis-version)]

"install!" "install"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

(def ^:private redis-image
"Official redis image."
"redis:7")
"docker.io/redis:7-bullseye")

(defn- build-redis
"Setup redis docker image"
Expand Down
6 changes: 3 additions & 3 deletions search-app/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
[org.clojure/tools.reader "1.3.2"]
[org.eclipse.emf/org.eclipse.emf.ecore "2.23.0"]
[org.eclipse.emf/org.eclipse.emf.common "2.21.0"]
[org.geotools/gt-shapefile "28-SNAPSHOT"]
[org.geotools/gt-geojsondatastore "24.6"]
[org.geotools.xsd/gt-xsd-kml "27.1"]
[org.geotools/gt-shapefile "29.1"]
[org.geotools/gt-geojsondatastore "27-SNAPSHOT"]
[org.geotools.xsd/gt-xsd-kml "29.1"]
[org.mozilla/rhino "1.7.12"]
[ring/ring-codec "1.1.3"]
[ring/ring-core "1.9.6"]
Expand Down
45 changes: 45 additions & 0 deletions search-app/resources/templates/tool-base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{% extends "templates/search-base.html" %}

{% block title %}CMR Preview{% endblock %}

{% block head-pre-css %}
//replace {{ preview-version }} with MMT-3263-10 temporarily for testing purpose.
<script defer src="{{ preview-root }}/plugin/metadata-preview.MMT-3263-10.js"></script>
<link href="{{ preview-root }}/plugin/metadata-preview.MMT-3263-10.min.css" rel="stylesheet" type="text/css">
{% endblock %}

{% block main-content %}
<div id="metadata-preview">
<p>Fetching Tool...</p>
</div>
{% endblock %}

{% block body-end %}
<script>
// Callback to set the page title when a tool is successfully loaded
function onSearchComplete(data) {
var tool = data.tool;

if (tool && tool.title) {
document.title = tool.title;
}
}

// Ensure scripts have loaded before initializing the preview plugin
document.addEventListener("DOMContentLoaded", function() {
// Get the element where the content should be displayed
const element = document.getElementById('metadata-preview');

// Initialize the preview plugin with `.init(config, element)`
const config = {
conceptId: "{{ concept-id }}",
conceptType: 'tool',
conceptUrlTemplate: '/search/concepts/{conceptId}.html',
token: "{{ token }}",
onSearchComplete: onSearchComplete
}

MetadataPreview.init(config, element);
});
</script>
{% endblock %}
Loading

0 comments on commit 37ae4e4

Please sign in to comment.