Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 7, 2025

This PR completely modernizes the user settings page (/sso/v1/users/settings) with a professional Bootstrap 5 interface and comprehensive SSH public key management functionality.

Key Features Added

🔑 SSH Public Key Management

  • Add/Delete Public Keys: Users can now manage multiple SSH public keys with descriptive names and types (RSA, ECDSA, Ed25519, DSA)
  • Host Group Assignment: Public keys can be assigned to specific host groups for targeted access control
  • Visual Key Management: Each key displays with name, type, fingerprint, enabled status, and current assignments
  • Modal-based Workflow: Intuitive modals for adding keys and managing host group assignments

🎨 Modern UI Design

  • Bootstrap 5 Integration: Professional card-based layout with dark theme matching Sentrius branding
  • Responsive Design: Clean, organized sections for User Preferences, SSH Keys, and Work Hours
  • Enhanced Visual Feedback: Font Awesome icons, status badges, and clear action buttons
  • Improved UX: Better spacing, typography, and interactive elements

API Endpoints Added

  • GET /api/v1/users/publickeys - Retrieve user's public keys
  • POST /api/v1/users/publickeys - Add new public key
  • POST /api/v1/users/publickeys/{keyId}/assign - Assign key to host group
  • DELETE /api/v1/users/publickeys/{keyId} - Delete public key

Technical Implementation

Backend Changes

  • Enhanced UserApiController with public key management endpoints
  • Added host group retrieval method to HostGroupService
  • Updated UserController to provide public key and host group data
  • Comprehensive security validation ensuring users can only manage their own keys

Frontend Changes

  • Complete redesign of user_settings.html template
  • JavaScript functionality for AJAX operations and modal interactions
  • Real-time validation and user feedback
  • Preserved existing work hours functionality

Testing

  • 5 comprehensive unit tests covering all CRUD operations
  • Error handling and edge case validation
  • Security verification for user ownership

Backward Compatibility

All existing functionality is preserved - user preferences and work hours configuration remain unchanged. The new public key management is an addition that doesn't affect existing workflows.

Before:

  • Basic form-based settings page
  • Limited customization options
  • No SSH key management

After:

  • Modern, professional interface
  • Comprehensive SSH public key management
  • Host group assignment capabilities
  • Enhanced user experience

Fixes #91.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • repository.jboss.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/Sentrius/Sentrius org.codehaus.plexus.classworlds.launcher.Launcher clean install -DskipTests (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits August 7, 2025 00:52
Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com>
Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com>
Copilot AI changed the title [WIP] Modernize user settings page Modernize user settings page with SSH public key management Aug 7, 2025
Copilot AI requested a review from phrocker August 7, 2025 00:59
@phrocker phrocker marked this pull request as ready for review August 7, 2025 10:34
@phrocker phrocker merged commit 4c01391 into main Aug 7, 2025
9 checks passed
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.

Modernize user settings page

2 participants