Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(jans-lock): add swagger #8754

Merged
merged 2 commits into from
Jun 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
305 changes: 305 additions & 0 deletions jans-lock/lock-master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,305 @@
components:
responses:
DEFAULT_ERROR:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Default error response
UNPROCESSABLE_ENTITY:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unprocessable Entity
schemas:
Audit:
properties:
client_id:
type: string
message:
type: string
result_code:
type: integer
required:
- client_id
- message
- result_code
type: object
Error:
properties:
code:
description: Error code
type: integer
errors:
description: Errors
type: object
message:
description: Error message
type: string
status:
description: Error name
type: string
type: object
PaginationMetadata:
properties:
first_page:
type: integer
last_page:
type: integer
next_page:
type: integer
page:
type: integer
previous_page:
type: integer
total:
type: integer
total_pages:
type: integer
type: object
WellKnown:
properties:
audit_uri:
type: string
config_uri:
type: string
lock_sse_uri:
type: string
oauth_as_well_known:
type: string
required:
- audit_uri
- config_uri
- lock_sse_uri
- oauth_as_well_known
type: object
securitySchemes:
Bearer:
bearerFormat: JWT
scheme: bearer
type: http
Client Credentials:
bearerFormat: JWT
description: Access Token for endpoint
flows:
clientCredentials:
scopes:
https://jans.io/oauth/scopes/cedarling: ''
https://jans.io/oauth/scopes/lock_sse: ''
tokenUrl: https://account.gluu.org/jans-auth/restv1/token
scheme: bearer
type: oauth2
host: https://lock.master.gluu.cloud
info:
title: Lock Master Endpoints
version: 0.1
openapi: 3.0.2
paths:
/.well-known/lock-master-configuration:
get:
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WellKnown'
description: OK
default:
$ref: '#/components/responses/DEFAULT_ERROR'
tags:
- Lock Master
/audit/health:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Audit'
required: true
responses:
'200':
description: OK
'422':
$ref: '#/components/responses/UNPROCESSABLE_ENTITY'
default:
$ref: '#/components/responses/DEFAULT_ERROR'
security:
- Client Credentials:
- https://jans.io/oauth/scopes/cedarling
summary: Sends health check
tags:
- Audit
/audit/log:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Audit'
required: true
responses:
'200':
description: OK
'422':
$ref: '#/components/responses/UNPROCESSABLE_ENTITY'
default:
$ref: '#/components/responses/DEFAULT_ERROR'
security:
- Client Credentials:
- https://jans.io/oauth/scopes/cedarling
summary: Sends log
tags:
- Audit
/audit/telemetry:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Audit'
required: true
responses:
'200':
description: OK
'422':
$ref: '#/components/responses/UNPROCESSABLE_ENTITY'
default:
$ref: '#/components/responses/DEFAULT_ERROR'
security:
- Client Credentials:
- https://jans.io/oauth/scopes/cedarling
summary: Sends telemetry log
tags:
- Audit
/config:
get:
parameters:
- in: query
name: policy_store_format
required: false
schema:
type: string
- in: query
name: policy_store_id
required: false
schema:
type: string
responses:
'200':
content:
application/octet-stream:
schema:
format: binary
type: string
description: OK
'422':
$ref: '#/components/responses/UNPROCESSABLE_ENTITY'
default:
$ref: '#/components/responses/DEFAULT_ERROR'
security:
- Client Credentials:
- https://jans.io/oauth/scopes/cedarling
summary: Returns a zip containing policy store(s)
tags:
- Config
/config/issuers:
get:
parameters:
- in: query
name: policy_store_format
required: false
schema:
type: string
- in: query
name: policy_store_id
required: false
schema:
type: string
responses:
'200':
description: OK
'422':
$ref: '#/components/responses/UNPROCESSABLE_ENTITY'
default:
$ref: '#/components/responses/DEFAULT_ERROR'
security:
- Client Credentials:
- https://jans.io/oauth/scopes/cedarling
summary: Returns schema for trusted issuers
tags:
- Config
/config/policy:
get:
parameters:
- in: query
name: policy_store_format
required: false
schema:
type: string
- in: query
name: policy_store_id
required: false
schema:
type: string
responses:
'200':
description: OK
'422':
$ref: '#/components/responses/UNPROCESSABLE_ENTITY'
default:
$ref: '#/components/responses/DEFAULT_ERROR'
security:
- Client Credentials:
- https://jans.io/oauth/scopes/cedarling
summary: Returns the policy set
tags:
- Config
/config/schema:
get:
parameters:
- in: query
name: policy_store_format
required: false
schema:
type: string
- in: query
name: policy_store_id
required: false
schema:
type: string
responses:
'200':
description: OK
'422':
$ref: '#/components/responses/UNPROCESSABLE_ENTITY'
default:
$ref: '#/components/responses/DEFAULT_ERROR'
security:
- Client Credentials:
- https://jans.io/oauth/scopes/cedarling
summary: Returns the schema for the policy
tags:
- Config
/lock_sse:
get:
responses:
'200':
description: OK
default:
$ref: '#/components/responses/DEFAULT_ERROR'
security:
- Client Credentials:
- https://jans.io/oauth/scopes/lock_sse
summary: Subscribes to SSE stream
tags:
- Lock SSE
tags:
- description: Lock Master Endpoints
name: Lock Master
- description: Posts Audit Log to Auth Server
name: Audit
- description: Retrieve policy stores
name: Config
- description: Subscribe to SSE
name: Lock SSE