Skip to content

Conversation

@bluepal-prasanthi-moparthi
Copy link
Collaborator

This PR includes the following Security - related endpoints:

  1. GET - /_db/{database-name}/_admin/server/tls
  2. POST - /_admin/server/tls
  3. POST - /_admin/server/encryption

@cla-bot cla-bot bot added the cla-signed label Sep 23, 2025
@cursor
Copy link

cursor bot commented Sep 23, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on September 28.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@bluepal-prasanthi-moparthi bluepal-prasanthi-moparthi force-pushed the feature/add_mis_endpoints_in_security branch from af968af to e3bc75f Compare September 24, 2025 10:31
@jwierzbo jwierzbo requested a review from Copilot September 29, 2025 06:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds three new security-related administration endpoints to the ArangoDB Go driver v2: TLS data retrieval, TLS data reload, and encryption key rotation functionality.

Key changes:

  • Added GetTLSData, ReloadTLSData, and RotateEncryptionAtRestKey methods to the ClientAdmin interface
  • Implemented corresponding data structures for TLS configuration and encryption key metadata
  • Added comprehensive test coverage for all three endpoints with proper error handling

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
v2/arangodb/client_admin.go Defines new interface methods and data structures for TLS and encryption operations
v2/arangodb/client_admin_impl.go Implements the three new security endpoint methods with proper HTTP handling
v2/tests/admin_test.go Adds comprehensive test functions with graceful error handling and validation
v2/CHANGELOG.md Documents the addition of security endpoints

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +366 to +370
if !strings.Contains(cert, "-----BEGIN CERTIFICATE-----") {
t.Logf("Warning: Certificate %d may not be in PEM format", i)
} else {
t.Logf("Certificate %d appears to be valid PEM format", i)
}
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PEM format validation is overly simplistic and only checks for the BEGIN marker. Consider also checking for the corresponding END marker or use proper PEM parsing from the crypto/x509 package for more robust validation.

Copilot uses AI. Check for mistakes.
@jwierzbo jwierzbo merged commit 24845a3 into master Sep 29, 2025
9 checks passed
@jwierzbo jwierzbo deleted the feature/add_mis_endpoints_in_security branch September 29, 2025 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants