SECURITY_SENSITIVE
Also known as
sensitive, security (with or without @ prefix)
Mark endpoint as security-sensitive to obfuscate parameter values in logs.
Syntax
@sensitiveExamples
Password Change Endpoint
create function change_password(_old_password text, _new_password text)
returns boolean
language sql
as $$...$$;
comment on function change_password(text, text) is
'HTTP POST
@authorize
@sensitive';Login Endpoint
create function authenticate(_username text, _password text)
returns json
language sql
as $$...$$;
comment on function authenticate(text, text) is
'HTTP POST
@login
@sensitive';Payment Processing
create function process_payment(_card_number text, _cvv text, _amount numeric)
returns json
language sql
as $$...$$;
comment on function process_payment(text, text, numeric) is
'HTTP POST
@authorize
@security_sensitive';Behavior
- Parameter values are replaced with
***in logs - Helps prevent sensitive data from appearing in log files
- Applies to all parameters of the endpoint
Related
- Logging configuration - Configure logging output
- Comment Annotations Guide - How annotations work
- Configuration Guide - How configuration works