-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EVerest Config Option #45
Open
louisg1337
wants to merge
4
commits into
thoughtworks:main
Choose a base branch
from
louisg1337:everest_config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
72cce43
Created config directory with patch files and script so that MaEVe ca…
louisg1337 5423151
Added ability for wss to not open if no certs were provided. Also cle…
louisg1337 2074773
Fixed small typo
louisg1337 6de9495
Removed extraneous change, deleted wss patch, fixed echo statement
louisg1337 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
if [ "$#" -lt 1 ] ; then | ||
echo "Usage: $0 <Security Profile>" | ||
echo "Where <Security Profile> is: 1, 2, or 3." | ||
exit 1 | ||
fi | ||
|
||
SP=$1 | ||
|
||
if [[ $SP == 2 || $SP == 3 ]]; then | ||
echo "Patching the CSMS to enable EVerest organization" | ||
patch -p1 -i config/everest/maeve-csms-everest-org.patch | ||
|
||
echo "Patching the CSMS to enable local mo root" | ||
patch -p1 -i config/everest/maeve-csms-local-mo-root.patch | ||
|
||
echo "Patching the CSMS to ignore OCSP" | ||
patch -p1 -i config/everest/maeve-csms-ignore-ocsp.patch | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/docker-compose.yml b/docker-compose.yml | ||
index b2d93e6..fa3a1ff 100644 | ||
--- a/docker-compose.yml | ||
+++ b/docker-compose.yml | ||
@@ -47,6 +47,8 @@ services: | ||
- "/certificates/csms.key" | ||
- "--tls-trust-cert" | ||
- "/certificates/trust.pem" | ||
+ - "--org-name" | ||
+ - "EVerest" | ||
- "--mqtt-addr" | ||
- "mqtt://mqtt:1883" | ||
- "--manager-api-addr" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
diff --git a/manager/handlers/ocpp201/authorize.go b/manager/handlers/ocpp201/authorize.go | ||
index 5df2305..0db9f79 100644 | ||
--- a/manager/handlers/ocpp201/authorize.go | ||
+++ b/manager/handlers/ocpp201/authorize.go | ||
@@ -38,7 +38,12 @@ func (a AuthorizeHandler) HandleCall(ctx context.Context, chargeStationId string | ||
if req.Certificate != nil { | ||
_, err = a.CertificateValidationService.ValidatePEMCertificateChain(ctx, []byte(*req.Certificate), req.IdToken.IdToken) | ||
idTokenInfo.Status, certificateStatus = handleCertificateValidationError(err) | ||
- if err != nil { | ||
+ if err.Error() == "failed to perform ocsp check after 1 attempts" { | ||
+ var tempStatus = types.AuthorizeCertificateStatusEnumTypeAccepted | ||
+ certificateStatus = &tempStatus | ||
+ idTokenInfo.Status = types.AuthorizationStatusEnumTypeAccepted | ||
+ span.SetAttributes(attribute.String("authorize.cert_warn", "No OCSP, but ignoring for testing purpose.")) | ||
+ } else if err != nil { | ||
span.SetAttributes(attribute.String("authorize.cert_error", err.Error())) | ||
} | ||
} | ||
@@ -46,7 +46,12 @@ func (a AuthorizeHandler) HandleCall(ctx context.Context, chargeStationId string | ||
if req.Iso15118CertificateHashData != nil { | ||
_, err := a.CertificateValidationService.ValidateHashedCertificateChain(ctx, *req.Iso15118CertificateHashData) | ||
idTokenInfo.Status, certificateStatus = handleCertificateValidationError(err) | ||
- if err != nil { | ||
+ if err.Error() == "failed to perform ocsp check after 1 attempts" { | ||
+ var tempStatus = types.AuthorizeCertificateStatusEnumTypeAccepted | ||
+ certificateStatus = &tempStatus | ||
+ idTokenInfo.Status = types.AuthorizationStatusEnumTypeAccepted | ||
+ span.SetAttributes(attribute.String("authorize.cert_warn", "No OCSP, but ignoring for testing purpose.")) | ||
+ } else if err != nil { | ||
span.SetAttributes(attribute.String("authorize.cert_error", err.Error())) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/config/manager/config.toml b/config/manager/config.toml | ||
index 3fa49ec..668eda9 100644 | ||
--- a/config/manager/config.toml | ||
+++ b/config/manager/config.toml | ||
@@ -19,12 +19,8 @@ firestore.project_id = "*detect-project-id*" | ||
type = "ocsp" | ||
|
||
[contract_cert_validator.ocsp.root_certs] | ||
-type = "opcp" | ||
-opcp.url = "https://open.plugncharge-test.hubject.com" | ||
-opcp.ttl = "24h" | ||
-opcp.auth.type = "hubject_test_token" | ||
-opcp.auth.hubject_test_token.url = "https://hubject.stoplight.io/api/v1/projects/cHJqOjk0NTg5/nodes/6bb8b3bc79c2e-authorization-token" | ||
-opcp.auth.hubject_test_token.ttl = "6h" | ||
+type = "file" | ||
+file.files = ["/certificates/root-MO-cert.pem"] | ||
|
||
[contract_cert_provider] | ||
type = "opcp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think MaEVe will accept this either since it is a hack. We should really have OCSP set up correctly.