Add endpoint-based HTTP Basic Authentication support with unified SPARQL Endpoints management#55
Conversation
- Add BasicAuthConfig type to RequestConfig interface - Add basicAuth field to request configuration with username/password - Implement Authorization header generation in sparql.ts - Add Authentication tab in Settings modal with username/password inputs - Add security notice about localStorage and HTTPS usage - Add proper theme-aware styling for auth inputs - Build successfully compiles with new types Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
- Add comprehensive user and developer documentation - Create unit tests for base64 encoding and auth header format - Document security considerations and best practices - Add code examples for various authentication scenarios - Include troubleshooting guide Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
- Add error handling for basicAuth function calls - Ensure authentication is cleared when credentials are incomplete - Improve consistency of authentication state management Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
MathiasVDA
left a comment
There was a problem hiding this comment.
@copilot the documentation needs to be integrated in the existing user and developer guide
- Move basic auth documentation from standalone file into existing guides - Add authentication section to user guide after Settings Modal - Add authentication section to developer guide in Request Configuration - Remove standalone docs/basic-authentication.md file - Keep user and developer documentation together in their respective guides Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Done in commit 0fb8c83. The basic authentication documentation has been integrated into the existing user and developer guides:
|
|
@copilot the authentication should be endpoint based and not tab based. Every tab that uses a certain endpoint should use the same authentication. I propose to integrate the authentication settings with the endpoint buttons. Name this the 'SPARQL Endpoints' section. Store every endpoint that a user accessed in this list by default. Allow deletion as normal. Keep the label column but allow this to be empty. Add a checkbox that activates this endpoint as a button, only possible when a label has been supplied. Add a button 'configure authentication' (or similar). We'll add other types of authentication in the future so keep this in mind when doing the design. Don't forget to rework the documentation and tests to align with your changes. Don't forget that any UI elements need to respond to theme changes. |
- Add EndpointConfig interface for endpoint-based storage with authentication - Update PersistentConfig to store endpoint configurations instead of tab-based auth - Add methods to manage endpoint configs (get, set, add/update, delete) - Modify Tab to inject authentication from endpoint config into request config - Add auto-tracking of accessed endpoints - Rename "Endpoint Buttons" tab to "SPARQL Endpoints" in settings modal - Remove standalone "Authentication" tab from settings modal - Preparing for comprehensive SPARQL Endpoints UI (next commit) Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
- Create comprehensive SPARQL Endpoints settings tab - Replace separate Authentication and Endpoint Buttons tabs - Add endpoints table with columns: Endpoint, Label, Button, Authentication, Actions - Implement authentication modal per endpoint (designed for future auth types) - Add auto-tracking of accessed endpoints - Update endpoint buttons to use new endpointConfigs with showAsButton flag - Add complete CSS styling for table and modal with theme support - Maintain backwards compatibility with legacy customEndpointButtons - Build successfully compiles Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Implemented in commits a5792d9 and 220c8da. The authentication is now endpoint-based with a unified "SPARQL Endpoints" settings tab. Key Changes:
Note: The UI renders correctly in the code, showing an empty state initially. Endpoints are auto-tracked when you change to a new endpoint URL. The table will populate with columns for endpoint management, label editing, button toggle, and authentication configuration. |
- Update user guide to reflect SPARQL Endpoints tab instead of Authentication tab - Document endpoint-based storage model - Add instructions for managing endpoints and configuring authentication per endpoint - Update developer guide with endpoint configuration API examples - Remove references to per-tab authentication - Emphasize that authentication is now shared across tabs using the same endpoint Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
|
@copilot the user should have the possibility to add an endpoint from the settings windows |
- Add "Add New Endpoint" form with URL input and "+ Add Endpoint" button - Allow users to manually add endpoints instead of only auto-tracking - Validate URL format before adding - Check for duplicate endpoints - Show improved empty message: "No endpoints yet. Add one below or access an endpoint to have it automatically tracked." - Add themed CSS styling for form (background, borders, button) - Full theme support with CSS custom properties for light/dark modes Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>
Implemented in commit 37a2025. Users can now manually add endpoints from the settings window. Features:
|
…:Matdata-eu/Yasgui into copilot/add-basic-authentication-support
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add check for existing Authorization header before adding basic auth - Only inject endpoint-based auth if basicAuth not already set programmatically - Properly delete authentication field when set to undefined in updates - Add aria-label to "Show as Button" checkbox for accessibility - Update documentation to clarify endpoint-based (not tab-based) authentication - Add security warnings about localStorage credential storage - Recommend secure alternatives (session tokens, OAuth) in examples Co-authored-by: MathiasVDA <15101339+MathiasVDA@users.noreply.github.com>



Implementation Complete ✅
All requirements from the original issue have been met with the endpoint-based architecture, plus code review feedback has been addressed.
Requirements Met
Latest Update: Code Review Fixes
Security & Best Practices:
Behavior Improvements:
basicAuthin request configundefinedin updatesDocumentation Clarity:
Architecture: Endpoint-Based Authentication
Before (Tab-Based - Original Implementation):
tab.requestConfig.basicAuthAfter (Endpoint-Based - As Requested):
persistentConfig.endpointConfigs[]basicAuthtakes precedence over endpoint-based authNew Data Structure
SPARQL Endpoints UI
The unified "SPARQL Endpoints" settings tab provides:
Screenshots
Empty State with Add Form (Light Theme):

With Added Endpoint (Light Theme):

Usage Examples
Endpoint-Based Configuration (Recommended)
Programmatic Override (Advanced)
Security Notes
Backwards Compatibility
customEndpointButtonsstill supported alongside newendpointConfigsbasicAuthconfiguration still works and takes precedenceFuture Extensibility
The authentication modal is designed to support future authentication types:
Type selector infrastructure in place; only requires adding new authentication type handlers.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.