Commit Graph

40 Commits

Author SHA1 Message Date
dee65c9ee4 Certificate Manager? 2025-08-17 16:13:39 +02:00
947a1313c8 Move no cars found so logs can be read
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-17 12:29:12 +02:00
f724e59f7f Configures telemetry using external file
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Reads telemetry configuration parameters such as hostname, port, and CA certificate from an external JSON file.
This decouples configuration from code, allowing for easier updates and management of telemetry settings.
2025-08-17 12:27:32 +02:00
701b578b71 Removes redundant content-type header
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Removes the explicit setting of the "Content-Type" header,
as HttpClient handles this automatically based on the content being sent.

This change simplifies the code and avoids potential conflicts
if the content type is already being set elsewhere.
2025-08-17 12:18:38 +02:00
0ac37d198c Configures insecure HTTP client for proxy
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s
Adds named HTTP client configuration with insecure settings to
communicate with the tesla_command_proxy, which uses a self-signed
certificate.

Changes the base address to use HTTPS.
2025-08-17 12:17:01 +02:00
3663595f78 Updates redirect URI for authorization
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s
Changes the redirect URI after successful authorization to a more specific endpoint, likely to integrate with a UI or service named "Tesla". This allows the application to properly handle the authorization response and proceed with the next steps.
2025-08-17 12:12:40 +02:00
04a708216a Uses local redirect for authorization.
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Changes from `RedirectToRoute` to `LocalRedirect` for the
authorization endpoint to improve security and ensure the
redirect stays within the application's domain.
2025-08-17 12:11:27 +02:00
f049d023c9 Adds Tesla API integration
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Adds an endpoint to interact with the Tesla API via a command proxy.

This includes fetching vehicle information and configuring telemetry settings. It introduces new models to represent the Tesla API responses and request structures.
2025-08-17 12:03:26 +02:00
663bb4b019 Return
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-17 00:39:46 +02:00
c05678b619 Set issuer
All checks were successful
Build, Push and Run Container / build (push) Successful in 21s
2025-08-17 00:37:23 +02:00
06514e2929 Refactors Tesla OIDC configuration retrieval
All checks were successful
Build, Push and Run Container / build (push) Successful in 23s
Replaces the default document retriever with a custom implementation.

This change simplifies the configuration by embedding the HTTP document retriever directly within the custom retriever, and centralizes the URL replacement logic for Tesla's OIDC configuration. This avoids injecting the HttpDocumentRetriever into the TeslaDocumentRetriever constructor and makes the code more maintainable.
2025-08-17 00:35:34 +02:00
8442fb8f05 Updates Tesla OIDC address.
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Updates the Tesla OIDC address to use the production environment.

This ensures that the application uses the correct endpoint for authentication
and avoids issues related to using the development environment in production.
2025-08-17 00:33:48 +02:00
9b96072982 Removes unused object instantiation
All checks were successful
Build, Push and Run Container / build (push) Successful in 23s
Removes the unnecessary instantiation of the OpenIdConnectConfigurationRetriever. The object is instantiated directly in the ConfigurationManager constructor, making the explicit instantiation redundant.
2025-08-17 00:32:05 +02:00
5dbaf01a99 Fix the fix
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-17 00:18:39 +02:00
944256940f Fix
Some checks failed
Build, Push and Run Container / build (push) Failing after 17s
2025-08-17 00:16:16 +02:00
02725b0596 Add validissuer
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
2025-08-16 23:53:01 +02:00
20b11cff71 Manual config
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-16 23:50:09 +02:00
890162394d Configures Tesla OIDC endpoints dynamically
All checks were successful
Build, Push and Run Container / build (push) Successful in 23s
Configures the Tesla OIDC endpoints using the base URL
to dynamically set authorization, token, JWKS URI, end
session, and user info endpoints. This eliminates the need
for a URL override function and centralizes the endpoint
configuration logic.
2025-08-16 23:37:14 +02:00
a192f1380b Configures OIDC with explicit endpoints
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
Configures the OpenID Connect (OIDC) authentication flow by
explicitly setting the authorization, token, JWKS, end session, and
user info endpoints.

This change removes the custom OIDC configuration manager and
directly sets the configuration within the OIDC options. This approach
simplifies the configuration and ensures that the application uses
the correct endpoints for authentication and authorization with the
third-party provider.
2025-08-16 23:31:35 +02:00
96dd0ff99a Configures Fleet-Auth OIDC authentication
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
Updates the authentication configuration to utilize Fleet-Auth's third-party OIDC configuration.

This change streamlines the authentication process by directly pointing to the third-party metadata and adds the Fleet API audience to the token request, ensuring proper authorization for accessing Tesla's Fleet API. It also configures Tesla specific parameters.
2025-08-16 23:13:00 +02:00
31bbc1a99d Better debug
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-16 23:01:01 +02:00
df60b4cda5 Enhances Tesla OIDC authentication
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Improves authentication by adding a signing key resolver and overriding the token endpoint.

This change ensures proper validation of Tesla's OIDC tokens by fetching the signing keys from the issuer's `certs` endpoint and caching them. It also configures the token endpoint required for Tesla authentication.
2025-08-16 22:54:56 +02:00
b6cd5e404e Disables issuer validation
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Disables issuer validation during token authentication.

The token validation parameters are adjusted to bypass
issuer validation, since the issuer is already validated via the `ValidIssuers` parameter.
2025-08-16 22:36:35 +02:00
6aa7221ed5 Adds valid issuers for Tesla authentication
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
Adds multiple valid issuers to the authentication configuration.
This ensures compatibility with different Tesla authentication endpoints,
including fleet and regional variations.
2025-08-16 22:30:22 +02:00
cab671193e Enhances request header logging.
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
Adds detailed logging of request headers for debugging purposes.

Clears known networks and proxies in forwarded headers options.

This change improves the ability to diagnose issues related to
request handling and forwarding in different environments.
2025-08-16 22:24:47 +02:00
e392f5a7b8 Configures forwarded headers for the application
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Ensures the application correctly handles forwarded headers
by explicitly setting the `ForwardedHeaders` option to `ForwardedHeaders.All`.

This allows the application to properly determine the client's
IP address and other request information when behind a proxy
or load balancer.
2025-08-16 22:14:35 +02:00
0af7c38a6b Adds ForwardedHeaders and debug endpoint
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Adds ForwardedHeaders to handle reverse proxy scenarios.

Adds a debug endpoint to display the correct scheme and host
when running behind a reverse proxy, aiding in debugging
authentication issues.
2025-08-16 22:12:14 +02:00
9755e516d9 Updates callback path for authentication
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Updates the callback path for authentication to a relative path.

This change removes the hardcoded domain from the callback URL,
making the application more flexible and easier to deploy in
different environments.
2025-08-16 22:05:44 +02:00
d3eb1bb66c Updates docker config and adds HttpContext
All checks were successful
Build, Push and Run Container / build (push) Successful in 23s
Removes a redundant host config in the docker file.

Adds HttpContextAccessor to the service collection. This
component is used to provide access to the current request context.
2025-08-16 22:04:10 +02:00
31f823b51f Configures Tesla OpenID Connect authentication
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
Implements authentication against the Tesla Fleet API using OpenID Connect.

Uses a custom OIDC configuration manager to override the token endpoint.
Configures authentication services and adds required scopes and parameters.
Adds endpoints for application registration and token retrieval during development.
2025-08-16 22:01:32 +02:00
a7ea7ff632 Add authorization and key-pairing
All checks were successful
Build, Push and Run Container / build (push) Successful in 30s
2025-08-16 20:40:27 +02:00
8c801c88ce Adds application authorization endpoint
All checks were successful
Build, Push and Run Container / build (push) Successful in 32s
Implements the /Authorize endpoint to redirect users to the Tesla
authentication page. This allows users to grant the application
permission to access their Tesla account data.

Updates the public key resource to be copied on build, ensuring
it is always available at runtime.

Adds logic to validate the application registration by comparing the
public key retrieved from the Tesla API with the public key stored
locally.
2025-08-13 22:29:48 +02:00
1b8fda32d9 Steps
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s
2025-08-13 19:36:32 +02:00
25f869851f Correct JSON
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-13 18:54:09 +02:00
519d840b19 Handle deserialization error
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
2025-08-12 21:52:56 +02:00
7fe4e6aef2 Change domain
Some checks failed
Build, Push and Run Container / build (push) Failing after 3s
2025-08-12 21:36:18 +02:00
183d71e203 POC big step
Some checks failed
Build, Push and Run Container / build (push) Failing after 33s
2025-08-12 16:48:16 +02:00
b7b5790620 Correct CI/CD
Some checks failed
Build, Push and Run Container / build (push) Failing after 4s
2025-08-06 17:44:53 +02:00
043f504cdd Proof Of Concept initial
Adds initial files for a proof-of-concept project, including Dockerfile, .gitignore, project files, and MQTT-related services.

This commit sets up the basic structure and configuration for exploring and validating the core concepts of the project.
2025-08-06 15:40:48 +02:00
bbc704fe6b Initial commit 2025-08-06 15:37:24 +02:00