generated from EOEPCA/um-service-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix develop dockerfile * Change keycloak urls * Fix develop workflow tag * Fix production workflow * Change log message * Change config * Add health check * Fix health check * Add ready health endpoint * Fix issue * Change workflow filenames * Eoepca 910 um keycloak develop an identity api based on keycloak api (#17) * feat: policies endpoints added, not completely * feat: working on update policies * feat: all remaining added, still policy update not working, create and update scope based permission not working * feat: last resource permissions endpoints added and working * fix: changed pyyaml version from 5.4.1 to 5.3.1 * feat: endpoints changed * Update README * Update config * Update config * Update config * Api testing (#18) * feat: added client_id as param to enpoints and other fixes * added changes for permissions endpoints * Update ci * Update ci * Release v1.0.0 --------- Co-authored-by: flaviorosadme <82375986+flaviorosadme@users.noreply.github.com>
- Loading branch information
1 parent
d89fbba
commit 2b8e380
Showing
19 changed files
with
230 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
[Keycloak] | ||
auth_server_url = http://localhost:8080 | ||
auth_server_url = http://localhost:8080/ | ||
admin_username = admin | ||
admin_password = admin | ||
realm = demo | ||
resource_server_endpoint = https://dummy-service.develop.eoepca.org | ||
admin_password = CHANGE ME | ||
realm = master | ||
[Swagger] | ||
swagger_url = /swagger-ui | ||
swagger_api_url = /swagger-ui-api | ||
swagger_app_name = Identity API | ||
swagger_app_name = Identity API |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,49 @@ | ||
from flask import Blueprint | ||
from flask import Blueprint, request | ||
|
||
|
||
def construct_blueprint(keycloak_client): | ||
keycloak_client = keycloak_client | ||
permissions = Blueprint('permissions', __name__) | ||
|
||
@permissions.route("/<client_id>/permissions", methods=["GET"]) | ||
def get_client_authz_permissions(client_id: str): | ||
return keycloak_client.get_client_authz_permissions(client_id) | ||
|
||
@permissions.route("/<client_id>/permissions/management", methods=["GET"]) | ||
def get_client_management_permissions(client_id: str): | ||
return keycloak_client.get_client_management_permissions(client_id) | ||
|
||
@permissions.route("/<client_id>/permissions/resources", methods=["GET"]) | ||
def get_client_resource_permissions(client_id: str): | ||
return keycloak_client.get_client_resource_permissions(client_id) | ||
|
||
#@permissions.route("/client_authz_scope_permissions/<client_id>/<scope_id>", methods=["GET"]) | ||
#def get_client_authz_scope_permissions(client_id: str, scope_id: str): | ||
# return keycloak_client.get_client_authz_scope_permissions(client_id, scope_id) | ||
|
||
#@permissions.route("/client_authz_scope_permissions/<client_id>", methods=["POST"]) | ||
#def create_client_authz_scope_based_permissions(client_id: str): | ||
# payload = request.get_json() | ||
# return keycloak_client.create_client_authz_scope_based_permission(client_id, payload) | ||
|
||
@permissions.route("/<client_id>/permissions/resources", methods=["POST"]) | ||
def create_client_authz_resource_based_permission(client_id: str): | ||
payload = request.get_json() | ||
return keycloak_client.create_client_authz_resource_based_permission(client_id, payload) | ||
|
||
@permissions.route("/<client_id>/permissions/management", methods=["PUT"]) | ||
def update_client_management_permissions(client_id: str): | ||
payload = request.get_json() | ||
return keycloak_client.update_client_management_permissions(client_id, payload) | ||
|
||
@permissions.route("/<client_id>/permissions/resources/<permission_id>", methods=["PUT"]) | ||
def update_client_authz_resource_permission(client_id: str, permission_id): | ||
payload = request.get_json() | ||
return keycloak_client.update_client_authz_resource_permission(client_id, payload, permission_id) | ||
|
||
#@permissions.route("/<client_id>/permissions/scopes/<scope_id>", methods=["PUT"]) | ||
#def update_client_authz_scope_permissions(client_id: str, scope_id): | ||
# payload = request.get_json() | ||
# return keycloak_client.update_client_authz_scope_permission(client_id, payload, scope_id) | ||
|
||
return permissions |
Oops, something went wrong.