|
1 |
| -# Centralized Configuration using github |
| 1 | +# Applying Security to Configurations |
2 | 2 |
|
3 |
| -GET -> `http://localhost:8888/s1rates/default/main` |
4 | 3 |
|
5 |
| -```json |
6 |
| -{ |
7 |
| - "name": "s1rates", |
8 |
| - "profiles": [ |
9 |
| - "default" |
10 |
| - ], |
11 |
| - "label": "main", |
12 |
| - "version": "29ab92d02e1e4aed70efe8eaee73472747797235", |
13 |
| - "state": null, |
14 |
| - "propertySources": [ |
15 |
| - { |
16 |
| - "name": "https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls/station1/s1rates.properties", |
17 |
| - "source": { |
18 |
| - "rate": "1.91", |
19 |
| - "lanecount": "1" |
20 |
| - } |
21 |
| - }, |
22 |
| - { |
23 |
| - "name": "https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls/s1rates.properties", |
24 |
| - "source": { |
25 |
| - "rate": "1.91", |
26 |
| - "lanecount": "1" |
27 |
| - } |
28 |
| - }, |
29 |
| - { |
30 |
| - "name": "https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls/application.properties", |
31 |
| - "source": { |
32 |
| - "rate": "1.55", |
33 |
| - "tollstart": "05:00", |
34 |
| - "tollstop": "22:00", |
35 |
| - "lanecount": "0", |
36 |
| - "invalid.connstring": "<n/a>" |
37 |
| - } |
38 |
| - } |
39 |
| - ] |
40 |
| -} |
41 |
| -``` |
| 4 | +<img width="852" alt="Screenshot 2022-06-05 at 11 10 23 AM" src="https://user-images.githubusercontent.com/54174687/172036983-63c7f673-8805-4a53-9223-7895f97e9f7c.png"> |
42 | 5 |
|
43 |
| -GET -> `http://localhost:8888/s2rates/default/main` |
| 6 | +- CURL |
44 | 7 |
|
45 |
| -```json |
46 |
| -{ |
47 |
| - "name": "s2rates", |
48 |
| - "profiles": [ |
49 |
| - "default" |
50 |
| - ], |
51 |
| - "label": "main", |
52 |
| - "version": "0b09e2f2ca026806afd9ab1c86114ad032fa0d79", |
53 |
| - "state": null, |
54 |
| - "propertySources": [ |
55 |
| - { |
56 |
| - "name": "https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls/station2/s2rates.properties", |
57 |
| - "source": { |
58 |
| - "rate": "1.65", |
59 |
| - "lanecount": "3" |
60 |
| - } |
61 |
| - }, |
62 |
| - { |
63 |
| - "name": "https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls/application.properties", |
64 |
| - "source": { |
65 |
| - "rate": "1.55", |
66 |
| - "tollstart": "05:00", |
67 |
| - "tollstop": "22:00", |
68 |
| - "lanecount": "0", |
69 |
| - "invalid.connstring": "<n/a>" |
70 |
| - } |
71 |
| - } |
72 |
| - ] |
73 |
| -} |
74 |
| -``` |
75 |
| ----------------- |
76 |
| -- After adding more granular paths for perf |
77 |
| - |
78 |
| -application.yml |
79 |
| - |
80 |
| -```yml |
81 |
| -server: |
82 |
| - port: 8888 |
83 |
| - |
84 |
| -#spring: |
85 |
| -# cloud: |
86 |
| -# config: |
87 |
| -# server: |
88 |
| -# git: |
89 |
| -# uri: https://github.com/javaHelper/pluralsight-spring-cloudconfig-wa-tolls |
90 |
| -# default-label: main |
91 |
| -# search-paths: |
92 |
| -# - station* |
93 |
| - |
94 |
| -spring: |
95 |
| - cloud: |
96 |
| - config: |
97 |
| - server: |
98 |
| - git: |
99 |
| - uri: https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-2 |
100 |
| - search-paths: |
101 |
| - - station* |
102 |
| - repos: |
103 |
| - perf: |
104 |
| - pattern: '*/perf' |
105 |
| - uri: https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-perf-2 |
106 |
| - search-paths: |
107 |
| - - 'station*' |
| 8 | +```sh |
| 9 | +curl --location --request GET 'http://localhost:8888/s1rates/default/main' \ |
| 10 | +--header 'Authorization: Basic cHJhdGVlazpwcmF0ZWVr' \ |
| 11 | +--header 'Cookie: JSESSIONID=478DA3869AC127A8DBC6A86B025D8BB4' |
108 | 12 | ```
|
109 | 13 |
|
110 |
| -GET -> `http://localhost:8888/s1rates/perf/main` |
111 |
| - |
| 14 | +Response: |
112 | 15 | ```json
|
113 | 16 | {
|
114 | 17 | "name": "s1rates",
|
115 | 18 | "profiles": [
|
116 |
| - "perf" |
117 |
| - ], |
118 |
| - "label": "main", |
119 |
| - "version": "e9ede2065766443f11b7331d5e6a482b04f38746", |
120 |
| - "state": null, |
121 |
| - "propertySources": [ |
122 |
| - { |
123 |
| - "name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-perf-2/station1/s1rates.properties", |
124 |
| - "source": { |
125 |
| - "rate": "5", |
126 |
| - "lanecount": "5" |
127 |
| - } |
128 |
| - }, |
129 |
| - { |
130 |
| - "name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-perf-2/application.properties", |
131 |
| - "source": { |
132 |
| - "rate": "1.55", |
133 |
| - "tollstart": "05:00", |
134 |
| - "tollstop": "22:00", |
135 |
| - "lanecount": "0" |
136 |
| - } |
137 |
| - } |
138 |
| - ] |
139 |
| -} |
140 |
| -``` |
141 |
| - |
142 |
| -GET -> http://localhost:8888/s3rates/perf/main |
143 |
| - |
144 |
| -```json |
145 |
| -{ |
146 |
| - "name": "s3rates", |
147 |
| - "profiles": [ |
148 |
| - "perf" |
| 19 | + "default" |
149 | 20 | ],
|
150 | 21 | "label": "main",
|
151 |
| - "version": "e9ede2065766443f11b7331d5e6a482b04f38746", |
| 22 | + "version": "f1b7f6ac9109f3a74212156bfa854f238be5540e", |
152 | 23 | "state": null,
|
153 | 24 | "propertySources": [
|
154 | 25 | {
|
155 |
| - "name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-perf-2/station3/s3rates.properties", |
| 26 | + "name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-2/station1/s1rates.properties", |
156 | 27 | "source": {
|
157 |
| - "rate": "9.10", |
158 |
| - "lanecount": "8" |
| 28 | + "rate": "2.91", |
| 29 | + "lanecount": "1" |
159 | 30 | }
|
160 | 31 | },
|
161 | 32 | {
|
162 |
| - "name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-perf-2/application.properties", |
| 33 | + "name": "https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls-2/application.properties", |
163 | 34 | "source": {
|
164 | 35 | "rate": "1.55",
|
165 | 36 | "tollstart": "05:00",
|
166 | 37 | "tollstop": "22:00",
|
167 |
| - "lanecount": "0" |
| 38 | + "lanecount": "0", |
| 39 | + "invalid.connstring": "<n/a>" |
168 | 40 | }
|
169 | 41 | }
|
170 | 42 | ]
|
|
0 commit comments