Commit 5669868
feat(Kotlin SDK): Iap kotlin sdk support (#1684)
This PR adds support for routing API requests through Identity-Aware
Proxy. This is done by putting an OIDC token in the header as
`Proxy-Authorization: Bearer <token>`. The OIDC is generated without
IamCredentialsClient library
To use, users need to provide their `iap_client_id` and
`iap_service_account_email` to the SDK's configuration payload.
```
Map<String, String> lookerConfig = new HashMap<>();
lookerConfig.put("base_url", "<Base_Url>");
lookerConfig.put("kotlin_http_transport", "JAVA_NET");
lookerConfig.put("client_id", "<Client_ID>");
lookerConfig.put("client_secret", "<Client_Secret>");
lookerConfig.put("iap_client_id", "<IAP_Client_ID>");
lookerConfig.put("iap_service_account_email", "<IAP_Service_Account_Email>);
ConfigurationProvider settings = ApiSettings.fromMap(lookerConfig);
Transport transport = new Transport(settings);
AuthSession session = new AuthSession(settings, transport);
LookerSDK sdk = new LookerSDK(session);
```
`iap_client_id` is the OAuth client ID that was set-up when configuring
the the identity-aware proxy.
`iap_service_account_email` is the service account that is authorized to
bypass IAP.
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Release-As: 26.6.31 parent ccd21d1 commit 5669868
2 files changed
Lines changed: 59 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 45 | | |
49 | | - | |
| 46 | + | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
88 | 102 | | |
| 103 | + | |
| 104 | + | |
89 | 105 | | |
90 | | - | |
| 106 | + | |
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
| |||
96 | 112 | | |
97 | 113 | | |
98 | 114 | | |
99 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
100 | 121 | | |
101 | 122 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
106 | 140 | | |
107 | 141 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
118 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
119 | 155 | | |
120 | 156 | | |
121 | 157 | | |
122 | 158 | | |
123 | | - | |
| 159 | + | |
124 | 160 | | |
125 | 161 | | |
126 | 162 | | |
| |||
0 commit comments