2
0

79 Commits

Author SHA1 Message Date
4dc9c34bcc fix(plugin): use DriverName instead of Dialect for DB detection
All checks were successful
Build and Release / Tests (push) Successful in 1m11s
Build and Release / Lint (push) Successful in 1m41s
Build and Release / Create Release (push) Successful in 0s
Replace x.Dialect().URI().DBType with x.DriverName() for more reliable database driver detection. Add support for 'pgx' and 'sqlite' driver variants alongside existing 'postgres' and 'sqlite3'. Improve logging with driver information and error messages for better migration debugging.
v1.0.60
2026-02-08 11:16:07 -05:00
b824b8e3be feat(vault): add database migration system for vault plugin
All checks were successful
Build and Release / Tests (push) Successful in 1m40s
Build and Release / Lint (push) Successful in 1m41s
Build and Release / Create Release (push) Successful in 0s
Implements explicit column migration logic to handle schema upgrades that xorm.Sync() doesn't reliably perform. Adds encryption_mode column migration for vault_secret table to support lockbox (E2E) encryption. Includes database-agnostic column existence checks and ALTER TABLE statement generation for PostgreSQL, MySQL, SQLite, and MSSQL.
v1.0.59
2026-02-08 10:38:39 -05:00
e9b109c464 docs: add comprehensive API reference documentation
All checks were successful
Build and Release / Tests (push) Successful in 1m26s
Build and Release / Lint (push) Successful in 1m59s
Build and Release / Create Release (push) Has been skipped
Creates new API.md with complete API reference including:
- Architecture and encryption model documentation
- Installation and configuration guides
- Authentication methods and API endpoints
- Go package API documentation
- Error codes and code examples
- License tier information

Also updates README.md to reference the new API documentation.
2026-02-07 09:25:38 -05:00
69f71cef7e docs: add lockbox end-to-end encryption documentation
Documents the new Lockbox feature for client-side encryption including:
- Feature comparison table between standard and lockbox modes
- Encryption scheme details (Argon2id + AES-256-GCM)
- API usage examples for Go, TypeScript, and Python SDKs
- Raw API endpoint documentation for manual encryption
2026-02-07 09:19:32 -05:00
fcb720736b feat(vault): add lockbox encryption mode to secrets
All checks were successful
Build and Release / Tests (push) Successful in 1m11s
Build and Release / Lint (push) Successful in 1m33s
Build and Release / Create Release (push) Successful in 0s
Added encryption_mode field to secrets supporting "standard" (server-side) and "lockbox" (client-side E2E) modes. Updated API to validate lockbox format (lockbox:v1:salt:ciphertext). Enhanced UI to display lock icons and badges for lockbox secrets. Lockbox secrets show locked state in web UI, requiring CLI/SDK for decryption.
v1.0.58
2026-02-07 02:14:26 -05:00
c38fe412f8 fix(vault): prevent dirty form warnings on key management forms
All checks were successful
Build and Release / Tests (push) Successful in 1m9s
Build and Release / Lint (push) Successful in 1m33s
Build and Release / Create Release (push) Has been skipped
2026-02-06 22:40:51 -05:00
3a920ce90c feat(vault): add confirmation modals for destructive operations
All checks were successful
Build and Release / Tests (push) Successful in 1m5s
Build and Release / Lint (push) Successful in 1m38s
Build and Release / Create Release (push) Successful in 0s
Replaced inline confirm() dialogs with proper modal dialogs for key migration, DEK rotation, token revocation, and version rollback operations. Improves UX and provides better context for destructive actions.
v1.0.57
2026-02-06 22:22:08 -05:00
c4d74c5682 feat(vault): add master key migration and DEK rotation
All checks were successful
Build and Release / Tests (push) Successful in 1m9s
Build and Release / Lint (push) Successful in 1m30s
Build and Release / Create Release (push) Successful in 1s
Implemented master key migration to re-encrypt vault DEKs when the master key changes. Added support for migrating single repositories or instance-wide. Implemented DEK rotation for Enterprise licenses to periodically rotate data encryption keys. Added new UI templates and API endpoints for key management operations with comprehensive error handling.
v1.0.56
2026-02-06 21:47:45 -05:00
f00027eb7c feat(vault): add encryption key mismatch detection and error handling
All checks were successful
Build and Release / Tests (push) Successful in 1m2s
Build and Release / Lint (push) Successful in 1m35s
Build and Release / Create Release (push) Successful in 1s
Added support for hex-encoded master keys (64 hex chars = 32 bytes) in crypto manager with fallback to raw bytes. Implemented comprehensive error handling for encryption/decryption failures across all vault endpoints (API and web). Created dedicated error template with user-friendly guidance for resolving key mismatch issues.
v1.0.55
2026-02-06 19:18:18 -05:00
e88d9f2e82 ci(i18n): configure authentication for private Go modules
All checks were successful
Build and Release / Tests (push) Successful in 1m3s
Build and Release / Lint (push) Successful in 1m28s
Build and Release / Create Release (push) Successful in 0s
Sets up git credential configuration and Go environment variables (GOPRIVATE, GONOSUMDB) to enable fetching private modules from git.marketally.com and code.gitcaddy.com during builds. Uses RELEASE_TOKEN secret for authentication and disables public proxy for private repositories.
v1.0.54
2026-02-04 14:01:06 -05:00
2aaf7223f1 feat(i18n): add vault key configuration error messages
Some checks failed
Build and Release / Tests (push) Failing after 21s
Build and Release / Lint (push) Failing after 21s
Build and Release / Create Release (push) Has been skipped
Adds English locale strings for vault encryption key warnings including fallback key usage, decryption failures, and encryption errors. Provides user-friendly explanations and remediation steps for each error scenario.
2026-02-04 13:55:08 -05:00
d9c35526bc feat(crypto): add key source tracking and fallback detection
Some checks failed
Build and Release / Lint (push) Failing after 24s
Build and Release / Tests (push) Failing after 23s
Build and Release / Create Release (push) Has been skipped
Adds tracking of master key source (app.ini, env var, file, or Gitea SECRET_KEY fallback) and exposes methods to check if fallback key is in use. This enables better visibility into which key configuration is active and helps identify when the system is using the less secure fallback option.
2026-02-04 13:47:33 -05:00
04d0d02962 chore(ci): update Go dependencies
All checks were successful
Build and Release / Tests (push) Successful in 1m37s
Build and Release / Lint (push) Successful in 1m53s
Build and Release / Create Release (push) Successful in 0s
Updates multiple dependencies including minio-go (v7.0.95 -> v7.0.98), klauspost/compress (v1.18.0 -> v1.18.2), tinylib/msgp (v1.4.0 -> v1.6.1), and various golang.org/x packages (crypto, net, sync, sys, text, mod, tools). Adds klauspost/crc32 v1.3.0 and go.yaml.in/yaml/v3 v3.0.4.
v1.0.52
2026-01-26 00:58:05 -05:00
d9e0936089 feat(routes): add vault token authentication fallback for secret APIs
Some checks failed
Build and Release / Lint (push) Has been cancelled
Build and Release / Tests (push) Has been cancelled
Build and Release / Create Release (push) Has been cancelled
Implements dual authentication strategy for secret management endpoints (PUT, restore, list versions, rollback). When Gitea user authentication is not available, the system now falls back to vault token authentication. This enables both user-based and token-based access patterns.

Changes include:
- Add Comment field to CreateSecretRequest for update operations
- Replace requireRepoWrite helper with inline auth checks
- Support userID=0 for token-based operations
- Apply consistent auth pattern across all affected endpoints
v1.0.51
2026-01-23 02:27:38 -05:00
d5beb9fc73 refactor(ci): split release workflow from build workflow
Some checks failed
Build and Release / Tests (push) Has been cancelled
Build and Release / Lint (push) Has been cancelled
Build and Release / Create Release (push) Has been cancelled
Moves release-specific jobs (keygen build and server trigger) from build.yml to new release-with-server.yml workflow. The build workflow now focuses on CI tasks (lint/test) and runs on push/PR, while release workflow handles manual releases via workflow_dispatch. This separation improves clarity and allows independent execution of build checks vs release processes.
2026-01-22 11:47:31 -05:00
627020eacb style(vault): center align empty state headers
Some checks failed
Build and Release / Tests (push) Failing after 16s
Build and Release / Lint (push) Failing after 20s
Build and Release / Create Release (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, darwin) (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, linux) (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, windows) (push) Has been skipped
Build and Release / Build Keygen Utility (arm64, darwin) (push) Has been skipped
Build and Release / Build Keygen Utility (arm64, linux) (push) Has been skipped
Build and Release / Trigger Server Rebuild (push) Has been skipped
2026-01-22 11:41:59 -05:00
0df0fb0955 feat(api): add vault token authentication for secrets API
Implements vault token (gvt_) authentication as an alternative to Gitea user auth for secrets API endpoints. Adds authenticateVaultToken helper that validates tokens, checks repository permissions, and supports both read and write operations. Updates list, get, and delete secret handlers to accept vault tokens with appropriate scopes.
2026-01-22 11:24:47 -05:00
7f627fac0d feat(vault): add token introspection endpoint
Some checks failed
Build and Release / Trigger Server Rebuild (push) Has been skipped
Build and Release / Tests (push) Has been cancelled
Build and Release / Lint (push) Has been cancelled
Build and Release / Create Release (push) Has been skipped
Build and Release / Build Keygen Utility (arm64, linux) (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, darwin) (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, linux) (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, windows) (push) Has been skipped
Build and Release / Build Keygen Utility (arm64, darwin) (push) Has been skipped
Add GET /token/info API endpoint for vault token introspection. Allows clients to validate tokens and retrieve scope, permissions, and expiration info. Implement GetTokenInfo service method that validates tokens without checking specific permissions.
2026-01-21 20:21:12 -05:00
06867c4a20 Delete public.key
All checks were successful
Build and Release / Lint (push) Successful in 2m10s
Build and Release / Tests (push) Successful in 1m38s
Build and Release / Create Release (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, darwin) (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, linux) (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, windows) (push) Has been skipped
Build and Release / Build Keygen Utility (arm64, darwin) (push) Has been skipped
Build and Release / Build Keygen Utility (arm64, linux) (push) Has been skipped
Build and Release / Trigger Server Rebuild (push) Has been skipped
2026-01-21 16:50:50 -05:00
22cb7f17b4 refactor(vault): use switch for error handling in secret creation
All checks were successful
Build and Release / Tests (push) Successful in 1m23s
Build and Release / Lint (push) Successful in 1m48s
Build and Release / Create Release (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, darwin) (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, linux) (push) Has been skipped
Build and Release / Build Keygen Utility (amd64, windows) (push) Has been skipped
Build and Release / Build Keygen Utility (arm64, darwin) (push) Has been skipped
Build and Release / Build Keygen Utility (arm64, linux) (push) Has been skipped
Build and Release / Trigger Server Rebuild (push) Has been skipped
Replace if-else chains with switch statements for cleaner error handling in CreateSecret routes. This improves readability and makes it easier to add new error cases.
2026-01-21 16:13:16 -05:00
6790c1ea7c feat(license): enforce tier limits for secrets and tokens
Add license limit enforcement when creating secrets and tokens. Pass license limits to service layer and return appropriate errors when tier limits are exceeded. Handle limit errors in both API and web routes with proper error messages prompting users to upgrade.
2026-01-21 15:55:29 -05:00
220e04c073 feat(license): default to Solo tier when no license present
Allow vault to run without a license file by defaulting to Solo tier (free). When no license is found, treat it as valid with Solo tier limits instead of returning an error. This enables free usage with basic features.
2026-01-21 13:43:13 -05:00
b9c316ef37 refactor(vault): remove unused requireLicense helper 2026-01-21 12:52:41 -05:00
ce289c67d0 refactor(vault): use requireWebLicense for HTML error pages
Replace requireLicense with requireWebLicense in all web route handlers to render proper HTML error pages instead of JSON responses when license validation fails. Add requireWebLicense helper that uses web context to display the not_installed template.
2026-01-21 12:42:11 -05:00
b7f0ad4d9b fix(vault): add missing SecretsByType data and fix pagination
Add SecretsByType grouping to vault list handler that was referenced in the template but not populated. Replace base/paginate template with custom pagination to match vault UI styling.
2026-01-21 12:06:44 -05:00
52cc82c5b2 feat(vault): add vault configuration check and improve UI
Add master key configuration check and display placeholder message when vault is not configured. Populate secret and user names in audit entries for better readability. Support never-expiring tokens by allowing "0" or empty TTL values.
2026-01-21 11:14:45 -05:00
bff719ca3f refactor(plugin): use PluginRouter interface for route registration
Replace custom chi.Router extraction logic with the new plugins.PluginRouter interface. This simplifies route registration by using the standardized plugin API instead of type assertions and reflection.
2026-01-21 10:35:02 -05:00
50b19d4378 fix(routes): reorder vault routes to prevent path conflicts
Move specific routes like /secrets/new and /secrets/{name}/versions before generic /secrets/{name} to prevent the parameter route from matching first. This ensures static paths and suffixed parameter routes are matched correctly before bare parameter routes.
2026-01-21 03:48:15 -05:00
253e4de879 fix(locale): repair corrupted Czech translation file
The cs-CZ locale file was corrupted with garbled characters. This restores the proper JSON structure and fixes character encoding issues in the Czech translations for the vault feature.
2026-01-21 02:33:34 -05:00
ebecdd57a8 feat(i18n): add 15 new language translations and update existing locales
Adds complete translations for Czech, Greek, Persian, Finnish, Irish, Hindi, Hungarian, Indonesian, Icelandic, Latvian, Portuguese (Portugal), Sinhala, Slovak, Swedish, Turkish, and Ukrainian. Updates existing translations for German, Spanish, French, Italian, Japanese, Korean, Dutch, Polish, Portuguese (Brazil), Russian, Chinese (Simplified), and Chinese (Traditional) with new vault comparison and file type features.
2026-01-21 02:06:16 -05:00
ecb9a7aae2 docs(vault): add vault plugin architecture documentation
Document the architectural separation between gitcaddy-vault plugin and gitcaddy-server, including component locations, responsibilities, and the key rule for where to place interface types versus implementation code.
2026-01-21 00:46:04 -05:00
8aed522586 feat(vault): add version comparison feature for secrets
- Add new compare endpoint and template for viewing diffs between secret versions
- Display creator information (name and avatar) for each version
- Add locale strings for comparison UI, type filters, and view modes
- Enhance permission checks to include owner and access mode validation
- Add non-database fields to SecretVersion model for UI display
2026-01-21 00:39:21 -05:00
a8d39d6aa5 feat(vault): add file type and enhance token metadata
Add 'file' as a new secret type option in vault templates and locale. Include CreatedUnix and UsedCount fields in token service responses. Refactor vault view template layout to use flexbox for better responsive design and remove version history table from main view.
2026-01-20 23:25:28 -05:00
5d62376a6c feat(vault): add UI enhancements and i18n translations
Adds edit secret form, hidden/raw value views, copy functionality, type filtering, and configuration error messages. Updates templates and adds new translation keys across all locale files for improved vault UX.
2026-01-20 22:07:42 -05:00
06dd6b1f82 feat(vault): add master key loading on plugin init
Loads the master encryption key during plugin initialization and provides helpful warnings if the key is not configured, guiding users to set MASTER_KEY in app.ini or GITCADDY_VAULT_KEY environment variable.
2026-01-20 16:56:58 -05:00
333d0a4f54 feat(vault): add app.ini config support for master key
Adds support for configuring vault master key via [vault] MASTER_KEY in app.ini with highest priority. Also adds IsConfigured() and ConfigurationError() methods to plugin interface for better configuration validation. Priority order is now: app.ini > env var > file > gitea secret key.
2026-01-20 00:42:30 -05:00
7ea93091f5 feat: add build-time version injection via ldflags
- Remove hardcoded PluginVersion constant
- Add Version variable settable via ldflags
- Update routes.go to use Version for UI display
- Version now injected by server build process
2026-01-18 20:30:47 -05:00
79703d9f69 build(ci): add server rebuild trigger and fix vault templates
Add automated workflow to trigger gitcaddy-server rebuild after vault releases. Fix CSRF token protection and update template helper function calls (TimeSince -> DateUtils.TimeSince, avatar -> AvatarUtils.Avatar) across all vault templates.
2026-01-18 17:53:43 -05:00
ece0b1329d fix: sync audit.tmpl with server template functions
- Use DateUtils.FullTime instead of DateTime
- Use ctx.AvatarUtils.Avatar instead of avatar
- Use base/paginate template for pagination

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 17:34:46 -05:00
9cfa9ebc82 docs: Add architecture documentation for vault-server sync
Explains that vault is source of truth for templates/locales,
and server syncs from vault at build time via sync-vault.sh.
Documents why Go plugins aren't used (compilation requirements).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 17:11:06 -05:00
11d57c9f37 feat(i18n): add license tier information to vault locales
Add translations for vault license tier display including license, tier, max secrets, max versions, audit retention, and unlimited fields across all supported languages. Also remove extra blank lines from locale files for consistency.
2026-01-18 15:13:17 -05:00
d40b660816 UI improvements and permission fixes
- Center "No Secrets" empty state text
- Add license tier badge and version in header
- Show Audit/Tokens menu for users with write access
- Fix permission checks with fallbacks for team-based access

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 11:01:57 -05:00
20222cc7c7 UI: Center empty state, add license/version display
- Center "No Secrets" text and description
- Show license tier badge and version in header

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 10:50:28 -05:00
99b5464399 feat: implement vault.Plugin service interface
Add service interface methods to VaultPlugin that delegate to the
standalone service functions. This allows the server's vault_service
to use GetPlugin() and call methods directly on the plugin.

Methods implemented:
- ListSecrets, GetSecret, GetSecretValue, CreateSecret, UpdateSecret
- DeleteSecret, RestoreSecret, RollbackSecret
- ListVersions
- ListTokens, CreateToken, RevokeToken, ValidateToken
- ListAuditEntries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 01:01:03 -05:00
1443be11bc fix: handle web.Router compatibility for compiled-in mode
When compiled into the server, the router passed is *web.Router not chi.Router.
Added ChiRouterProvider interface to extract the underlying chi router.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 00:33:21 -05:00
dbbc2f0d0d fix: rename module path to match repo name
Module path is now git.marketally.com/gitcaddy/gitcaddy-vault
to match the actual repository name.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:50:21 -05:00
b369d9ffbe refactor: compile vault into server instead of dynamic plugin
- Change package from main to vault for import compatibility
- Add init() auto-registration when package is imported
- Remove plugin build jobs from CI (no longer needed)
- Update README for compiled-in architecture
- Add BSL 1.1 license

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 22:12:41 -05:00
8c0023a3ab ci: dynamic server version fetching
- Remove hardcoded GITCADDY_SERVER_VERSION
- Each job fetches latest server version from API
- Clear Go module cache before building plugins
- Simplify server-release.yml to only create tags (no main commits)

This ensures vault always builds against the correct server version.
2026-01-17 19:31:15 -05:00
GitCaddy Bot
7e16403c62 build: auto-update server dependency to v3.0.16
Triggered by server release v3.0.16.
Vault v1.0.15 is compatible with server v3.0.16+.

🤖 Auto-generated by GitCaddy CI
2026-01-18 00:05:29 +00:00
GitCaddy Bot
cd93346591 build: auto-update server dependency to v3.0.14
Triggered by server release v3.0.14.
Vault v1.0.14 is compatible with server v3.0.14+.

🤖 Auto-generated by GitCaddy CI
2026-01-17 23:11:59 +00:00