@@ -70,9 +70,9 @@ var _ = Describe("MtlsScopeAuth", func() {
7070 Context ("when CallerIdentity is nil" , func () {
7171 It ("returns nil (identity check should have failed in pre-auth)" , func () {
7272 endpoint = route .NewEndpoint (& route.EndpointOpts {
73- AppId : "backend-app" ,
74- Host : "192.168.1.1" ,
75- Port : 8080 ,
73+ AppId : "backend-app" ,
74+ Host : "192.168.1.1" ,
75+ Port : 8080 ,
7676 RoutePolicyScope : route .RoutePolicyScopeOrg ,
7777 })
7878 pool = createPool (endpoint )
@@ -89,9 +89,9 @@ var _ = Describe("MtlsScopeAuth", func() {
8989 Context ("with scope=any" , func () {
9090 It ("allows any authenticated caller" , func () {
9191 endpoint = route .NewEndpoint (& route.EndpointOpts {
92- AppId : "backend-app" ,
93- Host : "192.168.1.1" ,
94- Port : 8080 ,
92+ AppId : "backend-app" ,
93+ Host : "192.168.1.1" ,
94+ Port : 8080 ,
9595 RoutePolicyScope : route .RoutePolicyScopeAny ,
9696 })
9797 pool = createPool (endpoint )
@@ -110,10 +110,10 @@ var _ = Describe("MtlsScopeAuth", func() {
110110 Context ("with scope=org" , func () {
111111 It ("allows caller from same org" , func () {
112112 endpoint = route .NewEndpoint (& route.EndpointOpts {
113- AppId : "backend-app" ,
114- Host : "192.168.1.1" ,
115- Port : 8080 ,
116- Tags : map [string ]string {"organization_id" : "org-123" },
113+ AppId : "backend-app" ,
114+ Host : "192.168.1.1" ,
115+ Port : 8080 ,
116+ Tags : map [string ]string {"organization_id" : "org-123" },
117117 RoutePolicyScope : route .RoutePolicyScopeOrg ,
118118 })
119119 pool = createPool (endpoint )
@@ -129,10 +129,10 @@ var _ = Describe("MtlsScopeAuth", func() {
129129
130130 It ("denies caller from different org with AuthError" , func () {
131131 endpoint = route .NewEndpoint (& route.EndpointOpts {
132- AppId : "backend-app" ,
133- Host : "192.168.1.1" ,
134- Port : 8080 ,
135- Tags : map [string ]string {"organization_id" : "org-123" },
132+ AppId : "backend-app" ,
133+ Host : "192.168.1.1" ,
134+ Port : 8080 ,
135+ Tags : map [string ]string {"organization_id" : "org-123" },
136136 RoutePolicyScope : route .RoutePolicyScopeOrg ,
137137 })
138138 pool = createPool (endpoint )
@@ -154,10 +154,10 @@ var _ = Describe("MtlsScopeAuth", func() {
154154
155155 It ("denies caller when endpoint has no organization_id tag" , func () {
156156 endpoint = route .NewEndpoint (& route.EndpointOpts {
157- AppId : "backend-app" ,
158- Host : "192.168.1.1" ,
159- Port : 8080 ,
160- Tags : map [string ]string {}, // No org tag
157+ AppId : "backend-app" ,
158+ Host : "192.168.1.1" ,
159+ Port : 8080 ,
160+ Tags : map [string ]string {}, // No org tag
161161 RoutePolicyScope : route .RoutePolicyScopeOrg ,
162162 })
163163 pool = createPool (endpoint )
@@ -178,10 +178,10 @@ var _ = Describe("MtlsScopeAuth", func() {
178178
179179 It ("denies caller when caller has no org" , func () {
180180 endpoint = route .NewEndpoint (& route.EndpointOpts {
181- AppId : "backend-app" ,
182- Host : "192.168.1.1" ,
183- Port : 8080 ,
184- Tags : map [string ]string {"organization_id" : "org-123" },
181+ AppId : "backend-app" ,
182+ Host : "192.168.1.1" ,
183+ Port : 8080 ,
184+ Tags : map [string ]string {"organization_id" : "org-123" },
185185 RoutePolicyScope : route .RoutePolicyScopeOrg ,
186186 })
187187 pool = createPool (endpoint )
@@ -205,10 +205,10 @@ var _ = Describe("MtlsScopeAuth", func() {
205205 Context ("with scope=space" , func () {
206206 It ("allows caller from same space" , func () {
207207 endpoint = route .NewEndpoint (& route.EndpointOpts {
208- AppId : "backend-app" ,
209- Host : "192.168.1.1" ,
210- Port : 8080 ,
211- Tags : map [string ]string {"space_id" : "space-abc" },
208+ AppId : "backend-app" ,
209+ Host : "192.168.1.1" ,
210+ Port : 8080 ,
211+ Tags : map [string ]string {"space_id" : "space-abc" },
212212 RoutePolicyScope : route .RoutePolicyScopeSpace ,
213213 })
214214 pool = createPool (endpoint )
@@ -224,10 +224,10 @@ var _ = Describe("MtlsScopeAuth", func() {
224224
225225 It ("denies caller from different space with AuthError" , func () {
226226 endpoint = route .NewEndpoint (& route.EndpointOpts {
227- AppId : "backend-app" ,
228- Host : "192.168.1.1" ,
229- Port : 8080 ,
230- Tags : map [string ]string {"space_id" : "space-abc" },
227+ AppId : "backend-app" ,
228+ Host : "192.168.1.1" ,
229+ Port : 8080 ,
230+ Tags : map [string ]string {"space_id" : "space-abc" },
231231 RoutePolicyScope : route .RoutePolicyScopeSpace ,
232232 })
233233 pool = createPool (endpoint )
@@ -249,10 +249,10 @@ var _ = Describe("MtlsScopeAuth", func() {
249249
250250 It ("denies caller when endpoint has no space_id tag" , func () {
251251 endpoint = route .NewEndpoint (& route.EndpointOpts {
252- AppId : "backend-app" ,
253- Host : "192.168.1.1" ,
254- Port : 8080 ,
255- Tags : map [string ]string {}, // No space tag
252+ AppId : "backend-app" ,
253+ Host : "192.168.1.1" ,
254+ Port : 8080 ,
255+ Tags : map [string ]string {}, // No space tag
256256 RoutePolicyScope : route .RoutePolicyScopeSpace ,
257257 })
258258 pool = createPool (endpoint )
@@ -272,10 +272,10 @@ var _ = Describe("MtlsScopeAuth", func() {
272272
273273 It ("denies caller when caller has no space" , func () {
274274 endpoint = route .NewEndpoint (& route.EndpointOpts {
275- AppId : "backend-app" ,
276- Host : "192.168.1.1" ,
277- Port : 8080 ,
278- Tags : map [string ]string {"space_id" : "space-abc" },
275+ AppId : "backend-app" ,
276+ Host : "192.168.1.1" ,
277+ Port : 8080 ,
278+ Tags : map [string ]string {"space_id" : "space-abc" },
279279 RoutePolicyScope : route .RoutePolicyScopeSpace ,
280280 })
281281 pool = createPool (endpoint )
@@ -300,10 +300,10 @@ var _ = Describe("MtlsScopeAuth", func() {
300300 It ("allows request when selected endpoint matches caller's space" , func () {
301301 // Endpoint from space-abc
302302 endpoint = route .NewEndpoint (& route.EndpointOpts {
303- AppId : "backend-app-1" ,
304- Host : "192.168.1.1" ,
305- Port : 8080 ,
306- Tags : map [string ]string {"space_id" : "space-abc" },
303+ AppId : "backend-app-1" ,
304+ Host : "192.168.1.1" ,
305+ Port : 8080 ,
306+ Tags : map [string ]string {"space_id" : "space-abc" },
307307 RoutePolicyScope : route .RoutePolicyScopeSpace ,
308308 })
309309
@@ -315,10 +315,10 @@ var _ = Describe("MtlsScopeAuth", func() {
315315
316316 // Another endpoint from space-xyz
317317 endpoint2 := route .NewEndpoint (& route.EndpointOpts {
318- AppId : "backend-app-2" ,
319- Host : "192.168.1.2" ,
320- Port : 8080 ,
321- Tags : map [string ]string {"space_id" : "space-xyz" },
318+ AppId : "backend-app-2" ,
319+ Host : "192.168.1.2" ,
320+ Port : 8080 ,
321+ Tags : map [string ]string {"space_id" : "space-xyz" },
322322 RoutePolicyScope : route .RoutePolicyScopeSpace ,
323323 })
324324 pool .Put (endpoint2 )
@@ -337,10 +337,10 @@ var _ = Describe("MtlsScopeAuth", func() {
337337 It ("denies request when selected endpoint is from different space (intermittent 403)" , func () {
338338 // Endpoint from space-xyz (will be selected)
339339 endpoint = route .NewEndpoint (& route.EndpointOpts {
340- AppId : "backend-app-2" ,
341- Host : "192.168.1.2" ,
342- Port : 8080 ,
343- Tags : map [string ]string {"space_id" : "space-xyz" },
340+ AppId : "backend-app-2" ,
341+ Host : "192.168.1.2" ,
342+ Port : 8080 ,
343+ Tags : map [string ]string {"space_id" : "space-xyz" },
344344 RoutePolicyScope : route .RoutePolicyScopeSpace ,
345345 })
346346
@@ -351,10 +351,10 @@ var _ = Describe("MtlsScopeAuth", func() {
351351
352352 // Endpoint from space-abc
353353 endpoint1 := route .NewEndpoint (& route.EndpointOpts {
354- AppId : "backend-app-1" ,
355- Host : "192.168.1.1" ,
356- Port : 8080 ,
357- Tags : map [string ]string {"space_id" : "space-abc" },
354+ AppId : "backend-app-1" ,
355+ Host : "192.168.1.1" ,
356+ Port : 8080 ,
357+ Tags : map [string ]string {"space_id" : "space-abc" },
358358 RoutePolicyScope : route .RoutePolicyScopeSpace ,
359359 })
360360 pool .Put (endpoint1 )
0 commit comments