Skip to content

Commit 5c4290d

Browse files
committed
feedback
1 parent 2f3bdd6 commit 5c4290d

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/validation-aws.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Install dependencies
4141
run: make deps
4242

43-
- name: Run Nebius validation tests
43+
- name: Run AWS validation tests
4444
env:
4545
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4646
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}

.github/workflows/validation-nebius.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Run Nebius validation tests
4444
env:
4545
NEBIUS_PUBLIC_KEY_ID: ${{ secrets.NEBIUS_PUBLIC_KEY_ID }}
46-
NEBIUS_PRIVATE_KEY_PEM_BASE64: ${{ secrets.NEBIUS_SERVICE_ACCOUNT_ID }}
46+
NEBIUS_PRIVATE_KEY_PEM_BASE64: ${{ secrets.NEBIUS_PRIVATE_KEY_PEM_BASE64 }}
4747
NEBIUS_SERVICE_ACCOUNT_ID: ${{ secrets.NEBIUS_SERVICE_ACCOUNT_ID }}
4848
NEBIUS_PROJECT_ID: ${{ secrets.NEBIUS_PROJECT_ID }}
4949
TEST_USER_PRIVATE_KEY_PEM_BASE64: ${{ secrets.TEST_USER_PRIVATE_KEY_PEM_BASE64 }}

internal/rsa/rsa.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,33 @@ func BytesToRSAKey(keyBytes []byte) (any, error) {
1515
// The key may be in OpenSSH format
1616
key, err := ssh.ParseRawPrivateKey(keyBytes)
1717
if err == nil {
18-
// No error, so we can parse into a key object
18+
// This is an OpenSSH key, now check to see if it is a private key
1919
switch k := key.(type) {
2020
case *rsa.PrivateKey, *ed25519.PrivateKey:
2121
return k, nil
2222
default:
23+
// This is an OpenSSH key, but it is not a private key
2324
return nil, fmt.Errorf("key is not an RSA private key")
2425
}
2526
}
2627

2728
// The key may be in PKCS8 format
2829
key, err = x509.ParsePKCS8PrivateKey(keyBytes)
2930
if err == nil {
30-
// No error, so we can parse into a key object
31+
// This is a PKCS8 key, now check to see if it is a private key
3132
switch k := key.(type) {
3233
case *rsa.PrivateKey, *ed25519.PrivateKey:
3334
return k, nil
3435
default:
36+
// This is a PKCS8 key, but it is not a private key
3537
return nil, fmt.Errorf("key is not an RSA private key")
3638
}
3739
}
3840

3941
// The key may be in PKCS1 format
4042
key, err = x509.ParsePKCS1PrivateKey(keyBytes)
4143
if err == nil {
44+
// This is a PKCS1 private key, return it
4245
return key, nil
4346
}
4447

v1/providers/aws/validation_network_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111

1212
var (
1313
isValidationTest = os.Getenv("VALIDATION_TEST")
14-
accessKeyID = os.Getenv("AWS_ACCESS_KEY_ID")
15-
secretAccessKey = os.Getenv("AWS_SECRET_ACCESS_KEY")
14+
accessKeyID = os.Getenv("AWS_ACCESS_KEY_ID")
15+
secretAccessKey = os.Getenv("AWS_SECRET_ACCESS_KEY")
1616
)
1717

1818
func TestAWSNetworkValidation(t *testing.T) {

0 commit comments

Comments
 (0)