-
Notifications
You must be signed in to change notification settings - Fork 59
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
feat: adds certificate validation on provider proxy #700
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
// will have certificate for every request | ||
const didHandshake = Object.keys(serverCert).length > 0; | ||
|
||
if (didHandshake && options.network && options.providerAddress) { |
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.
temporary ignore validation if options.network
and options.providerAddress
are empty because deploy-web
also require adjustments, just didn't want to create massive PR
e5164a5
to
f907e42
Compare
f907e42
to
2f46f23
Compare
2f46f23
to
1d5ae08
Compare
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.
Very well done and solid implementation! 🚀
@@ -16,6 +16,7 @@ const whitelist = [ | |||
"https://console-beta.akash.network" | |||
]; | |||
|
|||
app.disable("x-powered-by"); |
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.
What does that do?
body: options.body, | ||
headers: new Headers(options.headers), | ||
agent: httpsAgent | ||
const queryParams = `?filter.state=valid&filter.owner=${providerAddress}&pagination.limit=${this.certificatesAmountToFetch}`; |
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.
One thing to note is that it's possible for addresses to have more than 100 certificates. Although very unlikely, it has happened in the past and resulted in hard to find bugs. This is how we load them in the frontend and we have the same function in the indexer as well.
{ shortName: "ST", value: "Virginia" }, | ||
{ name: "localityName", value: "Blacksburg" }, |
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.
Where are these values taken from?
Why
We need to validate provider self-signed certificate
What
nodemon
for easier local development@akasnetwork/net
package for sharing blockchain configurationrefs: #170