Skip to content

Commit 4a1464b

Browse files
warwickschroederjasontaylordevwarwick-exia
authored
Add authentication and SSL/TLS to ServiceControl (#5197)
* Add initial authentication supporting JWT tokens, OpenID Connect, OAuth2.0 * Add ServicePulse-specific OIDC configuration and endpoint * Update src/ServiceControl/App.config Co-authored-by: Warwick Schroeder <warwick.schroeder@particular.net> * Update src/ServiceControl/App.config Co-authored-by: Warwick Schroeder <warwick.schroeder@particular.net> * Remove SP enabled flag * Update approved routes and settings * Allow multiple api scopes, or none. Add client audience config setting * Add auth to other instances * Rename to ApiScopes * Add additional options for flexible and secure hosting; SSL/TLS, Reverse Proxy, Direct HTTPS, CORS * Remove previously added rate limit for anon api * Forward auth header * Allow Anon for CheckRemotes * Remove unused rate limiting middleware * MapControllers correctly * Upgrade package * Update local testing files. Add debug endpoint for dev. * Update reverse proxy test file * Update HTTPS config and documentation * Update documentation for authentication * Add forward header tests for all instances. Add links to additional documentation in readme * Add more manual testing scenarios to docs. Rename files. * Clean doc formatting. Update hosting guide. * Update internal auth docs. Fix issue with server-to-server remote instance checks with auth. * Move public docs content to the docs PR * Clean servicecontrol hosting guide. Move content to docs RP (WIP) * Move public docs into docs PR * Clean forward header tests and add comments * Fix build issues * fix breaking tests. Add unit tests for security settings * Add security acceptance tests for Primary instance * Add CORS acceptance tests to audit and monitoring. * Add HTTPS acceptance tests to audit and monitoring * Add OpenID Conntect acceptance tests to audit and monitoring * Move some documentation to public docs * Small tweaks off review * Add comments. Update security setting validation. * Update tests off of review * Fix API approval tests * Update from feedback * Updates from testing. Add additional logging to support testing. Updates from feedback. * Remove sensitive data from diagnostics file * add MD doc file back in * Remove some details from debug logs. * Clean logging. Fix issue with Platform Connector when auth is enabled. * Undo making the connection controller anonymous. This is not required as ServicePulse should be the only client using it. * Forward Authorization header to remote instances * Update security package to .NET10 * Resolve new obsolete APIs due to .NET10 upgrade * Fix auth issue with service-to-service call audit-count --------- Co-authored-by: Jason Taylor <hello@jasontaylor.dev> Co-authored-by: Jason Taylor <1988321+jasontaylordev@users.noreply.github.com> Co-authored-by: Warwick Schroeder <warwick@exia-it.com>
1 parent ac20763 commit 4a1464b

148 files changed

Lines changed: 11389 additions & 78 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,10 @@ src/scaffolding.config
101101

102102
# Visual Studio Code
103103
.vscode
104+
105+
# AI config
106+
.claude/
107+
CLAUDE.md
108+
109+
# User-specific files
110+
.local

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ It's also possible to [locally test containers built from PRs in GitHub Containe
3131
### Infrastructure setup
3232

3333
If the instance is executed for the first time, it must set up the required infrastructure. To do so, once the instance is configured to use the selected transport and persister, run it in setup mode. This can be done by using the `Setup {instance name}` launch profile that is defined in
34-
the `launchSettings.json` file of each instance. When started in setup mode, the instance will start as usual, execute the setup process, and exit. At this point the instance can be run normally by using the non-setup launch profile.
34+
the `launchSettings.json` file of each instance. When started in setup mode, the instance will start as usual, execute the setup process, and exit. At this point the instance can be run normally by using the non-setup launch profile.
3535

3636
## Secrets
3737

@@ -56,6 +56,22 @@ Running all tests all the times takes a lot of resources. Tests are filtered bas
5656

5757
NOTE: If no variable is defined all tests will be executed.
5858

59+
## Security Configuration
60+
61+
Documentation for configuring security features:
62+
63+
- [TLS Configuration](https://docs.particular.net/servicecontrol/security/configuration/tls) - Configure HTTPS/TLS for secure connections
64+
- [Forwarded Headers](https://docs.particular.net/servicecontrol/security/configuration/forward-headers) - Configure X-Forwarded-* header handling for reverse proxy scenarios
65+
- [Authentication](https://docs.particular.net/servicecontrol/security/configuration/authentication) - Configure authentication for the HTTP API
66+
- [Hosting Guide](https://docs.particular.net/servicecontrol/security/hosting-guide) - Scenario based hosting options for ServiceControl
67+
68+
Local testing guides:
69+
70+
- [HTTPS Testing](docs/https-testing.md)
71+
- [Reverse Proxy Testing](docs/reverseproxy-testing.md)
72+
- [Forward Headers Testing](docs/forward-headers-testing.md)
73+
- [Authentication Testing](docs/authentication-testing.md)
74+
5975
## How to developer test the PowerShell Module
6076

6177
Steps:

0 commit comments

Comments
 (0)