Skip to content

Reliability improvements to PostgreSQL plugin and performance improvements to SHIELD auth flow#794

Merged
wayneeseguin merged 18 commits intoshieldproject:v10.0.0from
tristanpoland:develop
Mar 27, 2026
Merged

Reliability improvements to PostgreSQL plugin and performance improvements to SHIELD auth flow#794
wayneeseguin merged 18 commits intoshieldproject:v10.0.0from
tristanpoland:develop

Conversation

@tristanpoland
Copy link
Copy Markdown

@tristanpoland tristanpoland commented Aug 19, 2025

This pull request introduces several important improvements across the codebase, focusing on enhanced plugin functionality, improved developer workflows, and updates for compatibility and security. The most significant changes include adding permission checks and a skip option for the Postgres plugin, updating the S3 plugin to use the more secure IMDSv2 for instance profile credentials, and providing new Docker Compose setups for local development. There are also updates to the build process and minor UI enhancements.

Plugin Enhancements

  • Added upfront permission checks to the Postgres plugin's restore operation, with a new pg_skip_permission_check option allowing users to bypass the check if needed. This helps prevent confusing restore failures due to insufficient privileges, while still allowing flexibility for advanced users. [1] [2] [3] [4] [5] [6]
  • Updated the S3 plugin to use AWS IMDSv2 for retrieving instance profile credentials, improving security and compatibility with modern AWS environments. [1] [2]

Developer Workflow Improvements

  • Added a new docker-compose.local.yml file and corresponding demo-local/dev-local Makefile targets for easy local development and testing with all core components and dependencies. [1] [2]
  • Improved the Makefile to provide clearer plugin build messages and fallback logic, and enhanced demo/development targets for a smoother local developer experience. [1] [2]

Build and Dependency Updates

  • Updated the Go base image in the Dockerfile from 1.21 to 1.23 and ensured dependencies are tidied and vendored before building, improving compatibility and reproducibility. [1] [2]
  • Added a VERSION variable to the .env file for consistent versioning in builds.

Security and Permissions

  • Introduced .claude/settings.local.json to explicitly allow Bash and Python3 commands for local automation or testing purposes.

User Interface Improvements

  • Enhanced the main web UI to apply the theme from cookies before first paint, reducing flash of incorrect theme, and clarified download link text for Apple Silicon.
  • Removed redundant navigation markup from the main HTML template for cleaner structure.

Introduces a checkRestorePermissions function to verify that the user has sufficient privileges before starting a restore operation. This helps prevent restore failures due to inadequate permissions by checking for superuser status or database creation rights.
Introduces a new 'pg_skip_permission_check' boolean field to allow skipping upfront permission validation during restore. This is useful for advanced users who understand the risks and want to bypass permission checks, with appropriate warnings in the help text. The PostgresConnectionInfo struct and related logic are updated to support this option.
Corrected the method call to BooleanValueDefault for 'pg_skip_permission_check' in plugin.go and made minor formatting improvements. Added the postgres.exe binary to the repository.
Added a preliminary authentication check via bearings API before attempting to connect to the WebSocket. Refactored code to fetch and process bearings data only once, improving efficiency by rejecting subscription if authentication fails.
Refactored WebSocket handling to add a dedicated _reconnect method that validates authentication before reconnecting. Bearings data is now only processed on initial connection, not on reconnection, preventing redundant state updates.
Improves logic for processing bearings data on initial connection versus reconnection. On initial connection, all bearings data is cleared and reloaded; on reconnection, only core authentication data and grants are updated. Also fixes passing of bearings data during reconnection.
@tristanpoland tristanpoland changed the title Reliability and performance patches to PostgreSQL plugin and SHIELD auth flow Reliability improvements to PostgreSQL plugin and performance improvements to SHIELD auth flow Aug 19, 2025
Copy link
Copy Markdown
Contributor

@krutten krutten left a comment

Choose a reason for hiding this comment

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

Reviewed Changes.
PostgreSQL changes will need validation in upgrade environments but look correct

Add a local docker-compose stack and developer config, improve build flow, and modernize the UI styles. Files added: docker-compose.local.yml (local stack: vault/core/agent/webdav/demo) and .claude/settings.local.json; .gitignore updated to ignore /.vscode. Dockerfile: bump Go to 1.23 and run go mod tidy + go mod vendor before building. Makefile: add JOBS, more robust plugin build (fallback to module mode), safer demo target, and new demo-local / dev-local targets to run the local stack. Major rewrite of web/htdocs/shield.css to a modern dark/light theme using CSS variables, layout improvements, responsive tweaks and refreshed components.
Introduce a collapsible story-sidebar: include FontAwesome solid icons, restructure sidebar nav items to show icons + labels, and add a toggle button in index.html. Add JS handlers in events.js to toggle collapse state and persist it to localStorage, and restore persisted state on startup in shield.js. Add CSS in shield.css for collapsed/expanded styles, transitions, toggle button, and adjustments to footer and pane widths to support the compact sidebar.
Change index.html labels from "MacOS (M1)" to "MacOS (Apple Silicon)". Major CSS updates to top-bar and account UX in shield.css: set title widths and truncation, add styled account button and dropdown/flyout (menu, header, divider, item states, current-tenant styling), adjust top-bar spacing, move sidebar down (top/height calc) and tweak sidebar-toggle position, and remove an unused selector. These changes improve account menu usability and layout spacing.
Allow the top-bar dropdown to escape the bar and improve the sidebar toggle positioning and visuals. Removed overflow:hidden on table so dropdowns can escape, converted .top-bar .flyout from absolute to fixed (top:48px, min-width:260px) and adjusted its right positioning. Made the sidebar toggle fixed to the viewport and centered on the sidebar right edge / navbar bottom (computed left/top values), changed background to --bg-secondary, increased z-index to sit between sidebar and top-bar, refined transitions, added box-shadow, and consolidated collapsed-state selectors to use body.sidebar-collapsed. Also added a smooth icon rotation transition. These changes fix clipping issues and provide more stable, consistent positioning and styling for the toggle and flyout.
Add a light/dark theme toggle and apply persisted theme before first paint to avoid a flash. Introduce a top-bar inline navigation rendered for authenticated users (remove duplicated nav markup), and add a theme-toggle button with JS to toggle data-theme and store the choice in a cookie. Update CSS to style the new top-nav, compact the LOCKED banner into a compact, responsive inline warning, adjust sidebar-toggle positioning, and refine related layout/spacing for header/account link. Changes touch index.html, js/events.js (theme toggle handler + init script), and shield.css (navigation, theme toggle, locked state and layout tweaks).
Add bg.jpg asset and update shield.css to use it as the .hud background (cover, centered, no-repeat). Add a semi-opaque overlay (::before) to preserve card readability with a light-theme variant, and ensure .hud children are positioned above the overlay via relative positioning and z-index.
@wayneeseguin wayneeseguin changed the base branch from develop to v10.0.0 March 27, 2026 17:15
@wayneeseguin wayneeseguin merged commit 145f07b into shieldproject:v10.0.0 Mar 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants