Skip to content

Configuration endpoints to receive osquery configuration from gitOps#799

Merged
javuto merged 5 commits intomainfrom
gitops-osquery-configuration
Apr 3, 2026
Merged

Configuration endpoints to receive osquery configuration from gitOps#799
javuto merged 5 commits intomainfrom
gitops-osquery-configuration

Conversation

@javuto
Copy link
Copy Markdown
Collaborator

@javuto javuto commented Apr 3, 2026

Implementation of #746 and adding configuration endpoints to osctrl-tls to receive osquery configuration per environment, so it can be integrated in a gitOps flow. It disables the ability to edit configurations via osctrl-admin.

@javuto javuto requested a review from Copilot April 3, 2026 08:35
@javuto javuto added ✨ enhancement New feature or request osctrl-tls osctrl-tls related changes 🙏 feature request Request for new feature ⚙️ configuration Configuration related issues labels Apr 3, 2026
Copy link
Copy Markdown
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

Adds GitOps-oriented configuration ingestion to osctrl-tls by introducing dedicated configuration update endpoints and a “read-only configuration” mode that prevents edits through osctrl-admin.

Changes:

  • Introduces a new TLS POST endpoint (/{env}/{secret}/osquery-config) to push osquery configuration updates (optionally with integrity checking).
  • Extends TLS YAML/flag configuration to define config endpoints and adds an osquery.readOnly flag to disable configuration edits via admin.
  • Updates the admin configuration UI/POST handler to enforce read-only mode.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/types/types.go Adds request type for config endpoint payloads.
pkg/environments/environments.go Adds default path constant for the new config endpoint.
pkg/config/utils.go Includes config endpoints in generated TLS example config output.
pkg/config/types.go Adds configEndpoints config and osquery.readOnly flag in config types.
pkg/config/flags.go Adds CLI/env flag to enable read-only configuration mode.
cmd/tls/utils.go Wires loaded YAML configEndpoints into runtime params.
cmd/tls/main.go Registers the new TLS config endpoint when configured; wires handler options.
cmd/tls/handlers/post.go Implements the new config ingestion endpoint (base64+gzip + optional integrity).
cmd/tls/handlers/handlers.go Adds handler option/storage for configured endpoints.
cmd/admin/templates/conf.html Makes config editors read-only in the UI and disables actions when configured.
cmd/admin/handlers/post.go Blocks configuration updates when read-only mode is enabled.
.pre-commit-config.yaml Updates golangci-lint pre-commit hook revision.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

javuto and others added 4 commits April 3, 2026 10:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@javuto javuto merged commit fb9324d into main Apr 3, 2026
7 checks passed
@javuto javuto deleted the gitops-osquery-configuration branch April 3, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️ configuration Configuration related issues ✨ enhancement New feature or request osctrl-tls osctrl-tls related changes 🙏 feature request Request for new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants