Skip to content

Commit c7cf8b5

Browse files
BB2-3192: Added Accept-Language hearder to logging (#1198)
* BB2-3192: Added Accept-Language hearder to logging * Remove required for auth lang * Removed Accept lang header logging * BB2-3192: Added Accept-Language hearder to logging * Remove required for auth lang * Removed Accept lang header logging * Added query to splunk dashboard
1 parent 7417be6 commit c7cf8b5

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

apps/integration_tests/log_event_schemas.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
"auth_app_data_access_type": {"pattern": "RESEARCH_STUDY"},
9898
"auth_require_demographic_scopes": {"pattern": "^True$"},
9999
"req_qparam_client_id": {"type": "string"},
100+
"req_qparam_lang": {"type": "string"},
100101
"req_qparam_response_type": {"pattern": "code"},
101102
"req_app_name": {"pattern": "TestApp"},
102103
"req_app_id": {"type": "number"},
@@ -198,6 +199,7 @@
198199
"auth_crosswalk_action": {"enum": ["R", "C"]},
199200
"auth_require_demographic_scopes": {"pattern": "^True$"},
200201
"req_qparam_client_id": {"type": "string"},
202+
"req_qparam_lang": {"type": "string", "default": "en"},
201203
"req_qparam_response_type": {"pattern": "code"},
202204
"req_app_name": {"pattern": "TestApp"},
203205
"req_app_id": {"type": "number"},
@@ -244,6 +246,7 @@
244246
"req_user_username": {"type": "string"},
245247
"req_fhir_id": {"type": "string"},
246248
"req_qparam_client_id": {"type": "string"},
249+
"req_qparam_lang": {"type": "string"},
247250
"req_qparam_response_type": {"pattern": "code"},
248251
"req_app_name": {"pattern": "TestApp"},
249252
"req_app_id": {"type": "number"},

apps/logging/tests/audit_logger_schemas.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ def get_pre_fetch_fhir_log_entry_schema(version):
496496
"ip_addr": {"type": "string", "format": "ip-address"},
497497
"request_uuid": {"type": "string", "format": "uuid"},
498498
"req_qparam_client_id": {"type": "string"},
499+
"req_qparam_lang": {"type": "string"},
499500
"req_app_id": {"type": "string"},
500501
"req_app_name": {"type": "string"},
501502
"path": {"enum": ["/v1/o/authorize/", "/v2/o/authorize/"]},

hhs_oauth_server/request_logging.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ def to_dict(self):
339339
self._log_msg_update_from_querydict("req_qparam_beneficiary", "beneficiary")
340340
self._log_msg_update_from_querydict("req_qparam_beneficiary", "Beneficiary")
341341
self._log_msg_update_from_querydict("req_qparam_client_id", "client_id")
342+
self._log_msg_update_from_querydict("req_qparam_lang", "lang")
342343
self._log_msg_update_from_querydict("req_qparam_count", "count")
343344
self._log_msg_update_from_querydict("req_qparam_format", "_format")
344345
self._log_msg_update_from_querydict(

splunk/authorization_flow_dashboard.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@
204204
<latest>$t_local.latest$</latest>
205205
<sampleRatio>1</sampleRatio>
206206
</search>
207+
<search id="baseSearch13">
208+
<query>index=bluebutton source="/var/log/pyapps/perf_mon.log*" host=$bbEnv$ env=$bbEnvLabel$ $authAppNameExpr$ | spath "message.path" | search "message.path"="/$apiVersionsPattern$/o/authorize/" message.req_qparam_lang="es-mx" | fields time message.auth_uuid message.auth_app_name message.ip_addr message.response_code message.path message.auth_pkce_method message.req_qparam_lang</query>
209+
<earliest>$t_local.earliest$</earliest>
210+
<latest>$t_local.latest$</latest>
211+
<sampleRatio>1</sampleRatio>
212+
</search>
207213
<row>
208214
<panel>
209215
<title>1. Initial Authorization</title>
@@ -358,6 +364,20 @@
358364
<option name="refresh.display">progressbar</option>
359365
</single>
360366
</panel>
367+
<panel>
368+
<title>13. Spanish Language Authorization</title>
369+
<single>
370+
<search base="baseSearch13">
371+
<done>
372+
<set token="tokEpCount">$result.count$</set>
373+
</done>
374+
<query>search "message.req_qparam_lang"="es-mx" | stats count</query>
375+
</search>
376+
<option name="drilldown">all</option>
377+
<option name="height">226</option>
378+
<option name="refresh.display">progressbar</option>
379+
</single>
380+
</panel>
361381
</row>
362382
<row>
363383

0 commit comments

Comments
 (0)