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

feat(am): add Users API descriptor for user consent management #143

Merged
merged 1 commit into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions _data/sidebars/am_2_x_sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ entries:
output: web
url: /am/2.x/am_userguide_user_management_scim.html


- title: Installation Guide
output: web
folderitems:
Expand Down Expand Up @@ -172,7 +171,7 @@ entries:
output: web
url: /am/2.x/am_management_api_documentation.html

- title: Protocols
- title: APIs
output: web
folderitems:
- title: Overview
Expand All @@ -187,3 +186,7 @@ entries:
- title: SCIM 2.0
output: web
url: /am/2.x/am_protocols_scim_overview.html
- title: Users
output: web
url: /am/2.x/am_protocols_users_overview.html

2 changes: 1 addition & 1 deletion am/2.x/management-api/swagger.json

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion am/2.x/oauth2/swagger.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
#
# Copyright (C) 2015 The Gravitee team (http://gravitee.io)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

swagger: '2.0'
info:
description: >-
Gravitee.io - Access Management - OAuth 2.0 API.
Defines The OAuth 2.0 Authorization Framework Endpoints exposed by AM server.
version: 2.2.0
version: 2.5.0
title: Gravitee.io - Access Management - OAuth 2.0 API
contact:
email: contact@graviteesource.com
Expand Down
18 changes: 17 additions & 1 deletion am/2.x/oidc/swagger.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
#
# Copyright (C) 2015 The Gravitee team (http://gravitee.io)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

swagger: '2.0'
info:
description: >-
Gravitee.io - Access Management - OpenID Connect API.
Defines The OpenID Connect Endpoints exposed by AM server.
version: 2.2.0
version: 2.5.0
title: Gravitee.io - Access Management - OpenID Connect API
contact:
email: contact@graviteesource.com
Expand Down
18 changes: 17 additions & 1 deletion am/2.x/scim/swagger.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
#
# Copyright (C) 2015 The Gravitee team (http://gravitee.io)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

swagger: '2.0'
info:
description: >-
Gravitee.io - Access Management - SCIM 2.0 API.
Defines The SCIM 2.0 Endpoints exposed by AM server.
version: 2.2.0
version: 2.5.0
title: Gravitee.io - Access Management - SCIM 2.0 API
contact:
email: contact@graviteesource.com
Expand Down
5 changes: 5 additions & 0 deletions am/2.x/users/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: api
---

<redoc spec-url='{{ "swagger.yml" }}'></redoc>
145 changes: 145 additions & 0 deletions am/2.x/users/swagger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
#
# Copyright (C) 2015 The Gravitee team (http://gravitee.io)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

swagger: '2.0'
info:
description: >-
Gravitee.io - Access Management - Users API.
Defines Users Endpoints exposed by AM server.

Users endpoints are OAuth 2.0 secured and can be access either with a token with "consent_admin" scope
or if the token 'sub' claim match the "userId" path parameter.
version: 2.5.0
title: Gravitee.io - Access Management - Users API
contact:
email: contact@graviteesource.com
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
host: auth.gravitee.io
basePath: /{domain}/users
schemes:
- https
paths:
/{userId}/consents:
get:
tags:
- Users
summary: List user consents
description: Lists all consents for the specified user
produces:
- application/json
parameters:
- in: query
name: clientId
type: string
description: Specifies user-client consents combination
default: 1
responses:
'200':
description: A JSON object that represents a set of user consents
schema:
$ref: '#/definitions/UserConsents'
'401':
description: Invalid Token
delete:
tags:
- Users
summary: Revoke user consents
description: Revokes all consents for a specified user
parameters:
- in: query
name: clientId
description: Revoke user's consents per application basis
responses:
'204':
description: User's consents revoked
'401':
description: Invalid Token
/{userId}/consents/{consentId}:
get:
tags:
- Users
summary: Get user consent
description: Gets a consent for the specified user
produces:
- application/json
responses:
'200':
description: A JSON object that represents a user consent
schema:
$ref: '#/definitions/UserConsent'
'401':
description: Invalid Token
'404':
description: Consent not found
delete:
tags:
- Users
summary: Revoke user consent
description: Revokes one consent for a specified user
responses:
'204':
description: User consent is revoked
'401':
description: Invalid Token
securityDefinitions:
bearerAuth:
type: oauth2
tokenUrl: https://auth.gravitee.io/{domain}/oauth/token
authorizationUrl: https://auth.gravitee.io/{domain}/authorize
scopes:
consent_admin: Grants consent_admin access
definitions:
UserConsents:
type: object
properties:
schemas:
type: array
description: Array of Strings containing URIs that are used to indicate the namespaces of the SCIM schemas.
items:
$ref: '#/definitions/UserConsent'
UserConsent:
type: object
properties:
id:
type: string
description: Consent technical id.
userId:
type: string
description: User technical id.
clientId:
type: string
description: OAuth 2.0 client_id.
domain:
type: string
description: Security domain technical id.
status:
type: string
description: Consent status.
enum: [approved, denied]
scope:
type: string
description: Scope (permission) approved/denied by the user.
expiresAt:
type: date
description: Consent expiration date.
createadAt:
type: date
description: Consent creation date.
updatedAt:
type: date
description: Consent update date.
2 changes: 1 addition & 1 deletion index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ keywords: Gravitee.io, API Platform, API Management, API Gateway, oauth2, openid
* link:/am/2.x/am_quickstart_register_app.html[Quickstart]
* link:/am/2.x/am_userguide_overview.html[User Guide]
* link:/am/2.x/am_management_api_documentation.html[Management API]
* link:/am/2.x/am_protocols_overview.html[Protocols]
* link:/am/2.x/am_protocols_overview.html[APIs]

== Gravitee.io Alert Engine

Expand Down
6 changes: 5 additions & 1 deletion pages/am/2.x/protocols/protocols-overview.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Protocols
= APIs
:page-sidebar: am_2_x_sidebar
:page-permalink: am/2.x/am_protocols_overview.html
:page-folder: am/protocols
Expand All @@ -21,3 +21,7 @@ as well as to obtain basic profile information about the End-User in an interope

The System for Cross-domain Identity Management (SCIM) specification is designed to make managing user identities in cloud-based applications and services easier.
Its intent is to reduce the cost and complexity of user management operations by providing a common user schema and extension model.

== link:/am/2.x/am_protocols_users_overview.html[Users API]

The Gravitee.io AM Users API provides operations to manage users in your organization such as user consent management.
17 changes: 17 additions & 0 deletions pages/am/2.x/protocols/users/overview.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
= Users API
:page-sidebar: am_2_x_sidebar
:page-permalink: am/2.x/am_protocols_users_overview.html
:page-folder: am/protocols/users

== Overview

NOTE: New in Gravitee.io AM 2.5.x


The Gravitee.io AM Users API provides operations to manage users in your organization such as user consent management.

You can find Users API endpoints exposed by Gravitee.io Access Management :

* link:/am/2.x/users/index.html[Users API Console, window="_blank"] - link:/am/2.x/users/swagger.yml[Swagger spec, window="_blank"]