Skip to content
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

better edge auth test #106

Merged
merged 6 commits into from
Jul 30, 2021
Merged

better edge auth test #106

merged 6 commits into from
Jul 30, 2021

Conversation

atifali
Copy link
Contributor

@atifali atifali commented Jul 29, 2021

@atifali atifali requested review from ryantxu and FZambia July 29, 2021 22:25
Comment on lines 165 to 169
type AuthRequest struct {
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
AuthMechanism string `json:"authMechanism,omitempty"`
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is useful in the test... maybe use it in the real function?

Comment on lines 116 to 118
resp["accessKeyId"] = "YEWZb5yVBl9llM9TQvn10hD4wmXKlUCNgXeCQY5YmssV55FzAFZgcta2FUw8lIcz"
resp["secretAccessKey"] = "2wH5XvUVv2FKIxvvj3YNCblvMJkI67KbXZV6ZHiy2w16LPXZboZkYvCZymsyLFiW"
resp["sessionToken"] = "glPPiSJwMx3iDuLm5BsVJVA0t5wXVhMNHFyaOkh68yz48V9rcRjRke6nJG4ErwFh"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to avoid doubt -- can you make these invalid strings?

resp["accessKeyId"] = "dummyAccessKeyYEWZb5yVBl9llM9T..."

}

//helper function to create a certificate from a template and public key plus a parent certificate and private key
func CreateCert(template, parent *x509.Certificate, pub interface{}, parentPriv interface{}) (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func CreateCert(template, parent *x509.Certificate, pub interface{}, parentPriv interface{}) (
func createCert(template, parent *x509.Certificate, pub interface{}, parentPriv interface{}) (

keep private unless required

}

// generate a certificate template for the test server TLS
rootCertTmpl, err := CertTemplate()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to keep the test clear.... can you move in all the explicit (dummy/test) settings into the function?

Copy link

@FZambia FZambia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@atifali atifali merged commit 37aa8de into main Jul 30, 2021
@atifali atifali deleted the edge-auth-test branch July 30, 2021 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants