Skip to content

Commit 49c16db

Browse files
daniel-zamorajwteague
authored andcommitted
CMR-9215 fixes jwt configuration
1 parent 90dfd26 commit 49c16db

File tree

4 files changed

+92
-110
lines changed

4 files changed

+92
-110
lines changed

other/cmr-exchange/authz/resources/config/cmr-authz/config.edn

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
{:auth-caching
2-
{:jwt-public-key "{
3-
\"kty\": \"RSA\",
4-
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
5-
\"e\": \"AQAB\",
6-
\"kid\": \"edljwtpubkey_sit\"
7-
}"
8-
:init {}
2+
{:init {}
93
:ttl
104
{:minutes 60}
115
:lru
@@ -19,8 +13,13 @@
1913
:relative
2014
{:root
2115
{:url "/access-control"}}}}
22-
:edl
23-
{:rest
16+
:edl {:jwt {:public {:key "{
17+
\"kty\": \"RSA\",
18+
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
19+
\"e\": \"AQAB\",
20+
\"kid\": \"edljwtpubkey_sit\"
21+
}"}}
22+
:rest
2423
{:protocol "https"
2524
:host "sit.urs.earthdata.nasa.gov"}}
2625
:echo

other/cmr-exchange/authz/src/cmr/authz/components/config.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
(defn get-jwt-public-key
5656
[system]
57-
(get-in (get-cfg system) [:auth-caching :jwt-public-key]))
57+
(get-in (get-cfg system) [:cmr :edl :jwt :public :key]))
5858

5959
(defn get-edl-username
6060
[system]

other/cmr-exchange/ous-plugin/resources/config/cmr-plugin/config.edn

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{:api-version "v3"
22
:default-content-type "json"
3-
:auth-caching {:jwt-public-key "{
4-
\"kty\": \"RSA\",
5-
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
6-
\"e\": \"AQAB\",
7-
\"kid\": \"edljwtpubkey_sit\"
8-
}"
9-
:init {}
3+
:auth-caching {:init {}
104
:ttl {:minutes 60}
115
:lru {:threshold 1000}
126
:dumpfile "data/cache/authz-dump.edn"}
@@ -19,7 +13,13 @@
1913
:relative {:root {:url "/access-control"}}}}
2014
:concept {
2115
:variable {:version "1.1"}}
22-
:edl {:rest
16+
:edl {:jwt {:public {:key "{
17+
\"kty\": \"RSA\",
18+
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
19+
\"e\": \"AQAB\",
20+
\"kid\": \"edljwtpubkey_sit\"
21+
}"}}
22+
:rest
2323
{:protocol "https"
2424
:host "sit.urs.earthdata.nasa.gov"}}
2525
:echo {:rest {:protocol "https"
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,85 @@
11
{:api-version "v3"
22
:default-content-type "json"
3-
:auth-caching {:jwt-public-key "{
4-
\"kty\": \"RSA\",
5-
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
6-
\"e\": \"AQAB\",
7-
\"kid\": \"edljwtpubkey_sit\"
8-
}"
9-
:init {}
3+
:auth-caching {:init {}
104
:ttl {:minutes 60}
115
:lru {:threshold 1000}
126
:dumpfile "data/cache/authz-dump.edn"}
137
:concept-caching {:init {}
148
:ttl {:hours 24}
159
:dumpfile "data/cache/concept-dump.edn"}
16-
:cmr {
17-
:access {:control {:protocol "https"
10+
:cmr {:access {:control {:protocol "https"
11+
:host "cmr.sit.earthdata.nasa.gov"
12+
:relative {:root {:url "/access-control"}}}}
13+
:concept {:variable {:version "1.1"}}
14+
:edl {:jwt {:public {:key "{
15+
\"kty\": \"RSA\",
16+
\"n\": \"3LopSyeoSZZGorSPjk4mMbR0ybVSLvfrONGSGXCNXE6ScX9Y1QC_zV8fVeh4XO8tYDi9CgzqK3Nhjsd5KI0ZzTI8Lf52tyr7OzebZXGZpMvyvdp59wlbPL4WFkIHvWFpgypSrTQIRENKaYW_yQB9srq6JpUx14aRG5TpiBuPqgnGM-qBqPvLq5LX9kVhqbV46TuZd9uPn_gISut7A7K3Y5S24DZd3ebxXPap1cn6-mIY30QG5oYmVlMZxdVPhnTzjj4ZNsfyKSRKq3F_UapEr4ynhr-ONgj8HyozyFqTpUn3o8pKAMVaOEfZmRlqb3jnQknbcsJ9fNxmWUUZr_PysQ\",
17+
\"e\": \"AQAB\",
18+
\"kid\": \"edljwtpubkey_sit\"
19+
}"}}
20+
:rest
21+
{:protocol "https"
22+
:host "sit.urs.earthdata.nasa.gov"}}
23+
:echo {:rest {:protocol "https"
24+
:host "cmr.sit.earthdata.nasa.gov"
25+
:context "/legacy-services/rest"}}
26+
:max-pagesize 2000
27+
:service {:bridge {:protocol "https"
1828
:host "cmr.sit.earthdata.nasa.gov"
19-
:relative {:root {:url "/access-control"}}}}
20-
:concept {
21-
:variable {:version "1.1"}}
22-
:edl {:rest
23-
{:protocol "https"
24-
:host "sit.urs.earthdata.nasa.gov"}}
25-
:echo {:rest {:protocol "https"
26-
:host "cmr.sit.earthdata.nasa.gov"
27-
:context "/legacy-services/rest"}}
28-
:max-pagesize 2000
29-
:service {
30-
:bridge {:protocol "https"
31-
:host "cmr.sit.earthdata.nasa.gov"
32-
:public {:protocol "https"
33-
:host "cmr.sit.earthdata.nasa.gov"}
34-
:relative {:root {:url "/service-bridge"}}}}
35-
:search {:protocol "https"
36-
:host "cmr.sit.earthdata.nasa.gov"
37-
:relative {:root {:url "/search"}}}}
38-
:giovanni {
39-
:search {:protocol "https"
40-
:host "giovanni.gsfc.nasa.gov"
41-
:relative {:root {:url "/giovanni"}}}}
42-
:edsc {
43-
:search {:protocol "https"
44-
:host "search.sit.earthdata.nasa.gov"
45-
:relative {:root {:url "/search"}}}}
46-
:httpd {
47-
:port 3013
48-
:entry-point-fn cmr.opendap.app.core/main
49-
:route-fns {
50-
:api cmr.opendap.app.routes.rest.core/all
51-
:site cmr.opendap.app.routes.site/all}
52-
:pages {
53-
:default-title "CMR Service-Bridge"}
54-
:base-url "/service-bridge"
55-
:base-url-fn cmr.opendap.components.config/opendap-base-url
56-
:docs "resources/public/docs"
57-
:assets "resources/public/assets"
58-
:rest-docs
59-
{:base-url-template "%%BASE_URL%%"
60-
:source "resources/docs/rest-api/index.md"
61-
:outdir "resources/public/docs/service-bridge/docs/current/rest-api"}
62-
:skip-static #{"/service-bridge/docs"}
63-
:replace-base-url #{"/service-bridge/docs/current/rest-api"
64-
"/service-bridge/docs/current/reference/2000-usage.html"}
65-
:index-dirs #{"/service-bridge/docs/1.0.0/marginalia"
66-
"/service-bridge/docs/1.0.0/reference"
67-
"/service-bridge/docs/1.0.0/rest-api"
68-
"/service-bridge/docs/1.5.0/marginalia"
69-
"/service-bridge/docs/1.5.0/reference"
70-
"/service-bridge/docs/1.5.0/rest-api"
71-
"/service-bridge/docs/current/marginalia"
72-
"/service-bridge/docs/current/reference"
73-
"/service-bridge/docs/current/rest-api"}
74-
:streaming {
75-
:timeout 20000 ; milliseconds (20 seconds * 1000)
76-
:heartbeat 200 ; milliseconds
77-
}}
78-
:logging {
79-
:level :debug
80-
:nss [cmr org.httpkit]
81-
:color false}
82-
:mission-control {
83-
:messaging-type :core-async}
84-
:plugin {
85-
:jarfiles {
86-
;; The reducer factory function must take two args: plugin name and plugin
87-
;; type -- both of type ^String. The default reducer checks for an exact
88-
;; string match.
89-
:reducer-factory cmr.plugin.jar.core/create-has-plugin-type-reducer}
90-
:registry {
91-
:default {
92-
:plugin-name "CMR-Plugin"
93-
:plugin-type "service-bridge-app"
94-
;; The fowllowing needs to be an in-JAR path to a plugin's config file,
95-
;; which will be read once its plugin has been identifed as a plugin of
96-
;; the desired name/type.
97-
:config-file "config/cmr-plugin/config.edn"}
98-
:web {
99-
:route-keys [:httpd :route-fns]
100-
:api-route-key :api
101-
:site-route-key :site}}}
29+
:public {:protocol "https"
30+
:host "cmr.sit.earthdata.nasa.gov"}
31+
:relative {:root {:url "/service-bridge"}}}}
32+
:search {:protocol "https"
33+
:host "cmr.sit.earthdata.nasa.gov"
34+
:relative {:root {:url "/search"}}}}
35+
:giovanni {:search {:protocol "https"
36+
:host "giovanni.gsfc.nasa.gov"
37+
:relative {:root {:url "/giovanni"}}}}
38+
:edsc {:search {:protocol "https"
39+
:host "search.sit.earthdata.nasa.gov"
40+
:relative {:root {:url "/search"}}}}
41+
:httpd {:port 3013
42+
:entry-point-fn cmr.opendap.app.core/main
43+
:route-fns {:api cmr.opendap.app.routes.rest.core/all
44+
:site cmr.opendap.app.routes.site/all}
45+
:pages {:default-title "CMR Service-Bridge"}
46+
:base-url "/service-bridge"
47+
:base-url-fn cmr.opendap.components.config/opendap-base-url
48+
:docs "resources/public/docs"
49+
:assets "resources/public/assets"
50+
:rest-docs
51+
{:base-url-template "%%BASE_URL%%"
52+
:source "resources/docs/rest-api/index.md"
53+
:outdir "resources/public/docs/service-bridge/docs/current/rest-api"}
54+
:skip-static #{"/service-bridge/docs"}
55+
:replace-base-url #{"/service-bridge/docs/current/rest-api"
56+
"/service-bridge/docs/current/reference/2000-usage.html"}
57+
:index-dirs #{"/service-bridge/docs/1.0.0/marginalia"
58+
"/service-bridge/docs/1.0.0/reference"
59+
"/service-bridge/docs/1.0.0/rest-api"
60+
"/service-bridge/docs/1.5.0/marginalia"
61+
"/service-bridge/docs/1.5.0/reference"
62+
"/service-bridge/docs/1.5.0/rest-api"
63+
"/service-bridge/docs/current/marginalia"
64+
"/service-bridge/docs/current/reference"
65+
"/service-bridge/docs/current/rest-api"}
66+
:streaming {:timeout 20000 ; milliseconds (20 seconds * 1000)
67+
:heartbeat 200}} ; milliseconds
68+
:logging {:level :trace
69+
:nss [cmr org.httpkit]
70+
:color false}
71+
:mission-control {:messaging-type :core-async}
72+
:plugin {:jarfiles {;; The reducer factory function must take two args: plugin name and plugin
73+
;; type -- both of type ^String. The default reducer checks for an exact
74+
;; string match.
75+
:reducer-factory cmr.plugin.jar.core/create-has-plugin-type-reducer}
76+
:registry {:default {:plugin-name "CMR-Plugin"
77+
:plugin-type "service-bridge-app"
78+
;; The fowllowing needs to be an in-JAR path to a plugin's config file,
79+
;; which will be read once its plugin has been identifed as a plugin of
80+
;; the desired name/type.
81+
:config-file "config/cmr-plugin/config.edn"}
82+
:web {:route-keys [:httpd :route-fns]
83+
:api-route-key :api
84+
:site-route-key :site}}}
10285
:vendor "cmr-service-bridge"}

0 commit comments

Comments
 (0)