Skip to content

Conversation

prakashsvmx
Copy link
Member

@prakashsvmx prakashsvmx commented Apr 17, 2024

add user agent in admin client to display console in audit logs

Existing "userAgent":"MinIO (linux; amd64) madmin-go/2.0.0"

POST /
User-Agent: MinIO (linux; amd64; mode-server-xl) MinIO/2023-10-24T04:42:36Z MinIO/RELEASE.2023-10-24T04-42-36Z MinIO/2dc917e87f12166e4cfc3b1be24cf2bf70b29bbd CPU (total_cpus:1, total_cores:6; vendor:GenuineIntel; family:6; model:141; stepping:1; model_name:11th Gen Intel(R) Core(TM) i5-11500H @ 2.90GHz)
Content-Length: 2173
Content-Type: application/json
X-Minio-Deployment-Id: 00c2309d-6256-4ac4-b4a8-a27d982faeb3
X-Minio-Version: 2023-10-24T04:42:36Z

{"version":"1","deploymentid":"00c2309d-6256-4ac4-b4a8-a27d982faeb3","time":"2024-04-16T03:33:25.617386259Z","event":"","trigger":"incoming","api":{"name":"AddCannedPolicy","status":"OK","statusCode":200,"rx":136,"tx":0,"timeToResponse":"1990569ns","timeToResponseInNS":"1990569"},"remotehost":"192.168.1.105","requestID":"17C6A540B6433AB8","userAgent":"MinIO (linux; amd64) madmin-go/2.0.0","requestPath":"/minio/admin/v3/add-canned-policy","requestHost":"127.0.0.1:22000","requestClaims":{"accessKey":"C25YUL91FG90FVGOCCZK","exp":1713241892,"ldapUser":"uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io","ldapUsername":"bobfisher"},"requestQuery":{"name":"custom-policy-creation"},"requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=C25YUL91FG90FVGOCCZK/20240416//s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=4851cce9e0f403c8679611977a0bda91eab80a09ea7a767389b4bba3a63098b8","Content-Length":"136","User-Agent":"MinIO (linux; amd64) madmin-go/2.0.0","X-Amz-Content-Sha256":"3afa90f6dfde25489011d678e8f604a976782f7284e9d09c62b73acaf6c37dd3","X-Amz-Date":"20240416T033325Z","X-Amz-Security-Token":"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiJDMjVZVUw5MUZHOTBGVkdPQ0NaSyIsImV4cCI6MTcxMzI0MTg5MiwibGRhcFVzZXIiOiJ1aWQ9Ym9iZmlzaGVyLG91PXBlb3BsZSxvdT1od2VuZ2csZGM9bWluLGRjPWlvIiwibGRhcFVzZXJuYW1lIjoiYm9iZmlzaGVyIn0.TafbxhN0YpzBPJqlQM9LPNPyfYzeuqz2wu_oqeeAEtkhXCDMHqp1eLeGBDeR5fUTZOLHOPOlNj08146Jn30CKg","X-Forwarded-For":"192.168.1.105"},"responseHeader":{"Strict-Transport-Security":"max-age=31536000; includeSubDomains","Vary":"Origin,Accept-Encoding","X-Amz-Id-2":"48addc98c2360aa8669eaf51e6e422b59d52374e3af3dd7f59fd25b0da98e481","X-Amz-Request-Id":"17C6A540B6433AB8","X-Content-Type-Options":"nosniff","X-Xss-Protection":"1; mode=block"},"tags":{"objectLocation":{"name":"config/iam/policies/custom-policy-creation/policy.json","poolId":1,"setId":1,"disks":["/tmp/test-console/test-cs/data-1","/tmp/test-console/test-cs/data-2","/tmp/test-console/test-cs/data-3","/tmp/test-console/test-cs/data-4"]}},"accessKey":"C25YUL91FG90FVGOCCZK","parentUser":"uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io"}

With this PR "userAgent":"MinIO (linux; amd64) madmin-go/2.0.0 MinIO Console/(dev)",

POST /
Content-Type: application/json
X-Minio-Deployment-Id: b3f249c2-9eed-47f6-870e-78139c9ca0a6
X-Minio-Version: 2024-04-17T00:36:43Z
User-Agent: MinIO (linux; amd64; mode-server-xl 2024-04-17T00:36:43Z DEVELOPMENT.2024-04-17T00-36-43Z a8d601b64a0f01aae61530d121f66b2c5f58f13d;  CPU (total_cpus:1, total_cores:6; vendor:GenuineIntel; family:6; model:141; stepping:1; model_name:11th Gen Intel(R) Core(TM) i5-11500H @ 2.90GHz))
Content-Length: 1982

{"version":"1","deploymentid":"b3f249c2-9eed-47f6-870e-78139c9ca0a6","time":"2024-04-17T10:45:12.808917945Z","event":"","trigger":"incoming","api":{"name":"AddCannedPolicy","status":"OK","statusCode":200,"rx":105,"tx":0,"timeToResponse":"6053810ns","timeToResponseInNS":"6053810"},"remotehost":"[::1]","requestID":"17C70B6544471AD3","userAgent":"MinIO (linux; amd64) madmin-go/2.0.0 MinIO Console/(dev)","requestPath":"/minio/admin/v3/add-canned-policy","requestHost":"127.0.0.1:22000","requestClaims":{"accessKey":"O2D3R2ULEKSDMNGE8JCA","exp":1713391420,"parent":"minio"},"requestQuery":{"name":"test-new-policy-1"},"requestHeader":{"Authorization":"AWS4-HMAC-SHA256 Credential=O2D3R2ULEKSDMNGE8JCA/20240417//s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token, Signature=58a9b663b1c44bbc5f333bc091161c784018f82a98581bd34ff74b4d855744a9","Content-Length":"105","User-Agent":"MinIO (linux; amd64) madmin-go/2.0.0 MinIO Console/(dev)","X-Amz-Content-Sha256":"f6b14fc2b73e2bafede45ab60ab5e8308913d4ed970e46b84dad9c8d35afe616","X-Amz-Date":"20240417T104512Z","X-Amz-Security-Token":"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiJPMkQzUjJVTEVLU0RNTkdFOEpDQSIsImV4cCI6MTcxMzM5MTQyMCwicGFyZW50IjoibWluaW8ifQ.giZiWCZXpUP9v1yABTwmLA4HRMkaUmRtXuWaZ1CIKMtkTbMSNOXBYykVUZhIj8yUTNNuhS3xvhpwmNE4nozHaw","X-Forwarded-For":"::1"},"responseHeader":{"Strict-Transport-Security":"max-age=31536000; includeSubDomains","Vary":"Origin,Accept-Encoding","X-Amz-Id-2":"48addc98c2360aa8669eaf51e6e422b59d52374e3af3dd7f59fd25b0da98e481","X-Amz-Request-Id":"17C70B6544471AD3","X-Content-Type-Options":"nosniff","X-Xss-Protection":"1; mode=block"},"tags":{"objectLocation":{"name":"config/iam/policies/test-new-policy-1/policy.json","poolId":1,"setId":1,"disks":["/tmp/test-console/test-cs/data-1","/tmp/test-console/test-cs/data-2","/tmp/test-console/test-cs/data-3","/tmp/test-console/test-cs/data-4"]}},"accessKey":"O2D3R2ULEKSDMNGE8JCA","parentUser":"minio"}


@prakashsvmx prakashsvmx self-assigned this Apr 17, 2024
harshavardhana
harshavardhana previously approved these changes Apr 17, 2024
@prakashsvmx prakashsvmx force-pushed the admin-client-user-agent branch from 2bb03ed to d6972b6 Compare April 17, 2024 11:04
@bexsoft bexsoft merged commit 6cfb6ff into minio:master Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants