Skip to content

Commit c4a246d

Browse files
committed
remove access review endpoints
1 parent bfb771b commit c4a246d

File tree

3 files changed

+1
-103
lines changed

3 files changed

+1
-103
lines changed

packages/maas/bff/internal/api/app.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ func (app *App) Routes() http.Handler {
183183
attachMaaSModelRefHandlers(apiRouter, app)
184184
apiRouter.GET(constants.ApiPathPrefix+"/models", handlerWithApp(app, ListModelsHandler))
185185
apiRouter.GET(constants.IsMaasAdminPath, handlerWithApp(app, IsMaasAdminHandler))
186-
apiRouter.POST(constants.AccessReviewPath, handlerWithApp(app, AccessReviewHandler))
187186

188187
// Minimal Kubernetes-backed starter endpoints TODO: Remove?
189188
apiRouter.GET(UserPath, app.UserHandler)

packages/maas/bff/internal/constants/api_routes.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ const (
1515
APIKeyByIDPath = ApiPathPrefix + "/api-keys/:id"
1616

1717
// Access review
18-
IsMaasAdminPath = ApiPathPrefix + "/is-maas-admin"
19-
AccessReviewPath = ApiPathPrefix + "/access-review"
18+
IsMaasAdminPath = ApiPathPrefix + "/is-maas-admin"
2019

2120
// Subscription routes
2221
SubscriptionListPath = ApiPathPrefix + "/all-subscriptions"

packages/maas/bff/openapi.yaml

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -104,106 +104,6 @@ paths:
104104
application/json:
105105
schema:
106106
$ref: '#/components/schemas/ErrorResponse'
107-
108-
/api/v1/access-review:
109-
post:
110-
summary: Generic Self-Subject Access Review
111-
operationId: accessReview
112-
description: >
113-
Performs a SelfSubjectAccessReview for the requesting user against the
114-
specified Kubernetes resource, group, and verb. Returns `allowed: true`
115-
if the user has the requested permission.
116-
117-
Use this endpoint when you need a custom permission check beyond the
118-
fixed MaaS-admin check provided by `/api/v1/is-maas-admin`.
119-
120-
Token resolution priority:
121-
122-
1. `Authorization: Bearer <token>` — used by the ODH dashboard backend;
123-
correctly substituted with the impersonated user's token when the ODH
124-
dev impersonation feature (`DEV_IMPERSONATE_USER`) is active.
125-
126-
2. `x-forwarded-access-token` — fallback for standalone federated dev mode
127-
where the webpack proxy injects the real user's token directly.
128-
requestBody:
129-
required: true
130-
content:
131-
application/json:
132-
schema:
133-
type: object
134-
required:
135-
- data
136-
properties:
137-
data:
138-
type: object
139-
required:
140-
- resource
141-
- verb
142-
properties:
143-
group:
144-
type: string
145-
description: API group of the resource
146-
example: maas.opendatahub.io
147-
resource:
148-
type: string
149-
description: Resource type to check access for
150-
example: maasauthpolicies
151-
verb:
152-
type: string
153-
description: Action to check (e.g. get, list, create, patch, delete, *)
154-
example: create
155-
namespace:
156-
type: string
157-
description: Namespace scope for the check
158-
example: models-as-a-service
159-
examples:
160-
wildcard_admin_check:
161-
summary: Check if user can do anything
162-
value:
163-
data:
164-
group: ""
165-
resource: "*"
166-
verb: "*"
167-
maas_admin_check:
168-
summary: Check MaaS admin access explicitly
169-
value:
170-
data:
171-
group: maas.opendatahub.io
172-
resource: maasauthpolicies
173-
verb: create
174-
namespace: models-as-a-service
175-
responses:
176-
'200':
177-
description: Access check result
178-
content:
179-
application/json:
180-
schema:
181-
type: object
182-
properties:
183-
data:
184-
type: object
185-
properties:
186-
allowed:
187-
type: boolean
188-
description: Whether the user has the requested access
189-
required:
190-
- allowed
191-
example:
192-
data:
193-
allowed: true
194-
'400':
195-
description: Bad Request (missing token or missing required fields)
196-
content:
197-
application/json:
198-
schema:
199-
$ref: '#/components/schemas/ErrorResponse'
200-
'500':
201-
description: Internal Server Error
202-
content:
203-
application/json:
204-
schema:
205-
$ref: '#/components/schemas/ErrorResponse'
206-
207107
/api/v1/namespaces:
208108
get:
209109
summary: Get Namespaces

0 commit comments

Comments
 (0)