Skip to content

Commit 803480b

Browse files
committedJan 15, 2021
Add notes
1 parent bceae79 commit 803480b

File tree

1 file changed

+182
-1
lines changed

1 file changed

+182
-1
lines changed
 

‎README.md

+182-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@ This is a repo where I experiment with [Azure Java SDK](https://docs.microsoft.c
44

55
Specifically, I want to list incoming Private Link connections and accept them. [Learn more about Azure Private Link](https://docs.microsoft.com/en-us/azure/private-link/).
66

7+
# Overview
8+
9+
The code is in a single java file [Connections.java](./src/main/java/info/kupczynski/azure/privatelink/Connections.java).
10+
11+
Pass `-h` to see help:
12+
```
13+
Azure Private Link Connection Helper
14+
15+
Flags:
16+
-h : show help
17+
-s SUBSCRIPTION_ID : show connections for the given subscription
18+
-p : list pending connections
19+
-a CONNECTION_ID : approve the connection with the given ID
20+
21+
Required env variables:
22+
- AZURE_CLIENT_ID
23+
- AZURE_CLIENT_SECRET
24+
- AZURE_TENANT_ID
25+
- AZURE_SUBSCRIPTION_ID
26+
```
27+
728
# Usage
829

930
**Note: don't use it. It's POC quality.**
@@ -98,4 +119,164 @@ AZURE_SUBSCRIPTION_ID=...
98119

99120
# Notes
100121

101-
...
122+
- We can't use [`AzureResourceManager`](https://github.com/Azure/azure-sdk-for-java/blob/4eb4c4b/sdk/resourcemanager/azure-resourcemanager/src/main/java/com/azure/resourcemanager/AzureResourceManager.java#L125) which is the main entry point to SDK.
123+
- It doesn't cover Private Link connections.
124+
- The SDK has a huge footprint
125+
126+
<details>
127+
<summary>runtimeClasspath</summary>
128+
129+
```shell
130+
$ ./gradlew -q dependencies
131+
..
132+
runtimeClasspath - Runtime classpath of source set 'main'.
133+
+--- com.azure:azure-identity:1.2.2
134+
| +--- com.azure:azure-core:1.12.0
135+
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.3
136+
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.11.3
137+
| | | +--- com.fasterxml.jackson.core:jackson-core:2.11.3
138+
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.11.3
139+
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.11.3
140+
| | | \--- com.fasterxml.jackson.core:jackson-core:2.11.3
141+
| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.3
142+
| | | +--- com.fasterxml.jackson.core:jackson-core:2.11.3
143+
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.11.3
144+
| | | +--- com.fasterxml.jackson.core:jackson-databind:2.11.3 (*)
145+
| | | +--- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.11.3
146+
| | | | +--- com.fasterxml.jackson.core:jackson-annotations:2.11.3
147+
| | | | +--- com.fasterxml.jackson.core:jackson-core:2.11.3
148+
| | | | +--- com.fasterxml.jackson.core:jackson-databind:2.11.3 (*)
149+
| | | | +--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.2
150+
| | | | | \--- jakarta.activation:jakarta.activation-api:1.2.1
151+
| | | | \--- jakarta.activation:jakarta.activation-api:1.2.1
152+
| | | +--- org.codehaus.woodstox:stax2-api:4.2.1
153+
| | | \--- com.fasterxml.woodstox:woodstox-core:6.2.1
154+
| | | \--- org.codehaus.woodstox:stax2-api:4.2.1
155+
| | +--- org.slf4j:slf4j-api:1.7.30
156+
| | +--- io.projectreactor:reactor-core:3.3.12.RELEASE
157+
| | | \--- org.reactivestreams:reactive-streams:1.0.3
158+
| | \--- io.netty:netty-tcnative-boringssl-static:2.0.35.Final
159+
| +--- com.azure:azure-core-http-netty:1.7.1
160+
| | +--- com.azure:azure-core:1.12.0 (*)
161+
| | +--- io.netty:netty-handler:4.1.54.Final
162+
| | | +--- io.netty:netty-common:4.1.54.Final
163+
| | | +--- io.netty:netty-resolver:4.1.54.Final
164+
| | | | \--- io.netty:netty-common:4.1.54.Final
165+
| | | +--- io.netty:netty-buffer:4.1.54.Final
166+
| | | | \--- io.netty:netty-common:4.1.54.Final
167+
| | | +--- io.netty:netty-transport:4.1.54.Final
168+
| | | | +--- io.netty:netty-common:4.1.54.Final
169+
| | | | +--- io.netty:netty-buffer:4.1.54.Final (*)
170+
| | | | \--- io.netty:netty-resolver:4.1.54.Final (*)
171+
| | | \--- io.netty:netty-codec:4.1.54.Final
172+
| | | +--- io.netty:netty-common:4.1.54.Final
173+
| | | +--- io.netty:netty-buffer:4.1.54.Final (*)
174+
| | | \--- io.netty:netty-transport:4.1.54.Final (*)
175+
| | +--- io.netty:netty-handler-proxy:4.1.54.Final
176+
| | | +--- io.netty:netty-common:4.1.54.Final
177+
| | | +--- io.netty:netty-buffer:4.1.54.Final (*)
178+
| | | +--- io.netty:netty-transport:4.1.54.Final (*)
179+
| | | +--- io.netty:netty-codec:4.1.54.Final (*)
180+
| | | +--- io.netty:netty-codec-socks:4.1.54.Final
181+
| | | | +--- io.netty:netty-common:4.1.54.Final
182+
| | | | +--- io.netty:netty-buffer:4.1.54.Final (*)
183+
| | | | +--- io.netty:netty-transport:4.1.54.Final (*)
184+
| | | | \--- io.netty:netty-codec:4.1.54.Final (*)
185+
| | | \--- io.netty:netty-codec-http:4.1.54.Final
186+
| | | +--- io.netty:netty-common:4.1.54.Final
187+
| | | +--- io.netty:netty-buffer:4.1.54.Final (*)
188+
| | | +--- io.netty:netty-transport:4.1.54.Final (*)
189+
| | | +--- io.netty:netty-codec:4.1.54.Final (*)
190+
| | | \--- io.netty:netty-handler:4.1.54.Final (*)
191+
| | +--- io.netty:netty-buffer:4.1.54.Final (*)
192+
| | +--- io.netty:netty-codec-http:4.1.54.Final (*)
193+
| | +--- io.netty:netty-codec-http2:4.1.54.Final
194+
| | | +--- io.netty:netty-common:4.1.54.Final
195+
| | | +--- io.netty:netty-buffer:4.1.54.Final (*)
196+
| | | +--- io.netty:netty-transport:4.1.54.Final (*)
197+
| | | +--- io.netty:netty-codec:4.1.54.Final (*)
198+
| | | +--- io.netty:netty-handler:4.1.54.Final (*)
199+
| | | \--- io.netty:netty-codec-http:4.1.54.Final (*)
200+
| | +--- io.netty:netty-transport-native-unix-common:4.1.54.Final
201+
| | | +--- io.netty:netty-common:4.1.54.Final
202+
| | | +--- io.netty:netty-buffer:4.1.54.Final (*)
203+
| | | \--- io.netty:netty-transport:4.1.54.Final (*)
204+
| | +--- io.netty:netty-transport-native-epoll:4.1.54.Final
205+
| | | +--- io.netty:netty-common:4.1.54.Final
206+
| | | +--- io.netty:netty-buffer:4.1.54.Final (*)
207+
| | | +--- io.netty:netty-transport:4.1.54.Final (*)
208+
| | | \--- io.netty:netty-transport-native-unix-common:4.1.54.Final (*)
209+
| | +--- io.netty:netty-transport-native-kqueue:4.1.54.Final
210+
| | | +--- io.netty:netty-common:4.1.54.Final
211+
| | | +--- io.netty:netty-buffer:4.1.54.Final (*)
212+
| | | +--- io.netty:netty-transport:4.1.54.Final (*)
213+
| | | \--- io.netty:netty-transport-native-unix-common:4.1.54.Final (*)
214+
| | \--- io.projectreactor.netty:reactor-netty:0.9.15.RELEASE
215+
| | +--- io.netty:netty-codec-http:4.1.54.Final (*)
216+
| | +--- io.netty:netty-codec-http2:4.1.54.Final (*)
217+
| | +--- io.netty:netty-handler:4.1.54.Final (*)
218+
| | +--- io.netty:netty-handler-proxy:4.1.54.Final (*)
219+
| | +--- io.netty:netty-transport-native-epoll:4.1.54.Final (*)
220+
| | \--- io.projectreactor:reactor-core:3.3.12.RELEASE (*)
221+
| +--- net.minidev:json-smart:2.3
222+
| | \--- net.minidev:accessors-smart:1.2
223+
| | \--- org.ow2.asm:asm:5.0.4
224+
| +--- com.microsoft.azure:msal4j:1.8.0
225+
| | +--- com.nimbusds:oauth2-oidc-sdk:7.4
226+
| | | +--- com.github.stephenc.jcip:jcip-annotations:1.0-1
227+
| | | +--- com.nimbusds:content-type:2.0
228+
| | | +--- net.minidev:json-smart:[1.3.1,2.3] -> 2.3 (*)
229+
| | | +--- com.nimbusds:lang-tag:1.4.4
230+
| | | +--- com.nimbusds:nimbus-jose-jwt:8.14.1
231+
| | | | +--- com.github.stephenc.jcip:jcip-annotations:1.0-1
232+
| | | | \--- net.minidev:json-smart:[1.3.1,2.3] -> 2.3 (*)
233+
| | | \--- com.sun.mail:javax.mail:1.6.1
234+
| | | \--- javax.activation:activation:1.1
235+
| | +--- org.slf4j:slf4j-api:1.7.28 -> 1.7.30
236+
| | \--- com.fasterxml.jackson.core:jackson-databind:2.10.1 -> 2.11.3 (*)
237+
| +--- com.microsoft.azure:msal4j-persistence-extension:1.0.0
238+
| | +--- com.microsoft.azure:msal4j:1.4.0 -> 1.8.0 (*)
239+
| | +--- net.java.dev.jna:jna:5.5.0 -> 5.6.0
240+
| | +--- net.java.dev.jna:jna-platform:5.5.0 -> 5.6.0
241+
| | | \--- net.java.dev.jna:jna:5.6.0
242+
| | \--- org.slf4j:slf4j-api:1.7.7 -> 1.7.30
243+
| +--- com.nimbusds:oauth2-oidc-sdk:7.1.1 -> 7.4 (*)
244+
| +--- net.java.dev.jna:jna-platform:5.6.0 (*)
245+
| \--- org.linguafranca.pwdb:KeePassJava2:2.1.4
246+
| +--- org.linguafranca.pwdb:KeePassJava2-kdb:2.1.4
247+
| | +--- org.linguafranca.pwdb:database:2.1.4
248+
| | | +--- org.jetbrains:annotations:15.0
249+
| | | +--- com.google.guava:guava:19.0
250+
| | | \--- com.madgag.spongycastle:core:1.54.0.0
251+
| | \--- org.jetbrains:annotations:15.0
252+
| +--- org.linguafranca.pwdb:KeePassJava2-dom:2.1.4
253+
| | \--- org.linguafranca.pwdb:KeePassJava2-kdbx:2.1.4
254+
| | +--- org.linguafranca.pwdb:database:2.1.4 (*)
255+
| | +--- commons-codec:commons-codec:1.10
256+
| | \--- org.jetbrains:annotations:15.0
257+
| +--- org.linguafranca.pwdb:KeePassJava2-jaxb:2.1.4
258+
| | \--- org.linguafranca.pwdb:KeePassJava2-kdbx:2.1.4 (*)
259+
| \--- org.linguafranca.pwdb:KeePassJava2-simple:2.1.4
260+
| +--- org.linguafranca.pwdb:KeePassJava2-kdbx:2.1.4 (*)
261+
| +--- org.simpleframework:simple-xml:2.7.1
262+
| | +--- stax:stax-api:1.0.1
263+
| | +--- stax:stax:1.2.0
264+
| | | \--- stax:stax-api:1.0.1
265+
| | \--- xpp3:xpp3:1.1.3.3
266+
| +--- org.apache.httpcomponents:httpcore:4.4.5
267+
| \--- com.fasterxml:aalto-xml:1.0.0
268+
| \--- org.codehaus.woodstox:stax2-api:4.0.0 -> 4.2.1
269+
+--- com.azure.resourcemanager:azure-resourcemanager-network:2.1.0
270+
| \--- com.azure.resourcemanager:azure-resourcemanager-resources:2.1.0
271+
| +--- com.azure:azure-core:1.10.0 -> 1.12.0 (*)
272+
| \--- com.azure:azure-core-management:1.0.0
273+
| \--- com.azure:azure-core:1.8.1 -> 1.12.0 (*)
274+
\--- org.apache.logging.log4j:log4j-slf4j-impl:2.14.0
275+
+--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
276+
+--- org.apache.logging.log4j:log4j-api:2.14.0
277+
\--- org.apache.logging.log4j:log4j-core:2.14.0
278+
\--- org.apache.logging.log4j:log4j-api:2.14.0
279+
..
280+
```
281+
282+
</details>

0 commit comments

Comments
 (0)
Please sign in to comment.