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(jans-lock-master): process telemetry data from Cedraling and post it to config api #8733

Open
Tracked by #8745
yurem opened this issue Jun 19, 2024 · 2 comments
Assignees
Labels
kind-feature Issue or PR is a new feature request
Milestone

Comments

@yurem
Copy link
Contributor

yurem commented Jun 19, 2024

Calendaring has communication channel with Lock master only. In this case it should post periodically telemetry data to /audit endpoint.

Data should be send in CBOR format and have at least next properties:

/audit/telemetry:
last_policy_load_time
last_policy_load_size
last_policy_load_status

policy_success_load_counter
policy_failed_load_counter

last_policy_evaluation_time_ns
avg_policy_evaluation_time_ns
mem_usage_mb
count_evaluation_requests

After getting this data Lock master should forward it to config-api

@mo-auto mo-auto added the kind-feature Issue or PR is a new feature request label Jun 19, 2024
@yurem yurem changed the title feat(jans-lock-master): process telemetry datafrom Cedraling and post it config api feat(jans-lock-master): process telemetry data from Cedraling and post it to config api Jun 19, 2024
@pujavs
Copy link
Contributor

pujavs commented Jun 20, 2024

Looking into it

@moabu moabu added this to the 1.1.4 milestone Jul 8, 2024
@pujavs
Copy link
Contributor

pujavs commented Jul 12, 2024

Impacted modules changes in

  • lock-master
  • config-api
  • setup

Changes:

  • lock-master /jans-lock/v1/audit/telemetry endpoint internally calls config-api jans-config-api/lock/audit/telemetry with required oauth scope to persist the data.
  • config-api: persists the telemetry data in DB
  • setup: New config properties for lock client and endpoint details
    Note Lock should have its pre-registered client, during setup a client with with required scope should be created and its details should be updated in lock DB config.

Only snippet of newly added config properties are as follows;
{
...........
"issuerUrl": "https://pujavs-probable-alpaca.gluu.info",
"clientId": "1800.222ebcc3-6f3f-4a27-bf99-6d1fc57f8295",
"clientPassword": "e4HafedZpRWR6ZbB6h6V8Q==",
"tokenUrl": "https://pujavs-probable-alpaca.gluu.info/jans-auth/restv1/token",
"endpointDetails": {
"jans-config-api/lock/audit/telemetry": [
"https://jans.io/oauth/lock/telemetry.readonly",
"https://jans.io/oauth/lock/telemetry.write"
],
"jans-config-api/lock/audit": [
"https://jans.io/oauth/lock/audit.readonly",
"https://jans.io/oauth/lock/audit.write"
],
"jans-config-api/lock/audit/health": [
"https://jans.io/oauth/lock/health.readonly",
"https://jans.io/oauth/lock/health.write"
]
},
.................................
}

Screenshot

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind-feature Issue or PR is a new feature request
Projects
None yet
Development

No branches or pull requests

4 participants