Skip to content

Commit

Permalink
Merge pull request #1173 from jfrog/remove-pgp-keys-from-tests
Browse files Browse the repository at this point in the history
Remove RSA and PGP keys from tests
  • Loading branch information
alexhung authored Jan 15, 2025
2 parents a0e150e + 796f467 commit b0a18ec
Show file tree
Hide file tree
Showing 16 changed files with 274 additions and 1,531 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ jobs:
echo "JFROG_ACCESS_TOKEN=$JFROG_ACCESS_TOKEN" >> "$GITHUB_ENV"
- name: Execute acceptance tests
run: make acceptance
env:
JFROG_TEST_PGP_PRIVATE_KEY: ${{ secrets.JFROG_TEST_PGP_PRIVATE_KEY }}
JFROG_TEST_PGP_PUBLIC_KEY: ${{ secrets.JFROG_TEST_PGP_PUBLIC_KEY }}
JFROG_TEST_RSA_PRIVATE_KEY: ${{ secrets.JFROG_TEST_RSA_PRIVATE_KEY }}
JFROG_TEST_RSA_PUBLIC_KEY: ${{ secrets.JFROG_TEST_RSA_PUBLIC_KEY }}
- name: Install provider
run: |
export PROVIDER_VERSION=$(git describe --tags --abbrev=0 | sed -n 's/v\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1.\2.\3/p')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func skipFederatedRepo() (bool, string) {

func federatedTestCase(repoType string, t *testing.T) (*testing.T, resource.TestCase) {
if skip, reason := skipFederatedRepo(); skip {
t.Skipf(reason)
t.Skip(reason)
}

name := fmt.Sprintf("federated-%s-%d", repoType, rand.Int())
Expand Down Expand Up @@ -107,44 +107,10 @@ func TestAccDataSourceFederatedAlpineRepository(t *testing.T) {
pair_type = "RSA"
alias = "foo-alias{{ .kp_id }}"
private_key = <<EOF
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA2ymVc24BoaZb0ElXoI3X4zUKJGZEetR6F4yT1tJhkPDg7UTm
iNoFB5TZJvP6LBrrSwszk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mt00EOOJKw+CLq
csFt9MUgxz/xov2qaj7aC+bc3k7msUVaRLardpAkZ09AUrQyQGRWf50/XPUu+dO4
5iYxVu6OH/uIa664k6qDwAECgYEAslS8oomgEL3VhbWkx1dLA5MMggTPfgpFNsMY
4Y4JXcLrUEUgjzjEvW0YUdMiLhP8qapDSiXxj1D3f9myxWSp8g0xc9UMZEjCZ9at
RcjNyP8zBLnCKqokSt6B3puyDsnvvrC/ugIBbnTFBOCJSZG7J7CwJx8z3KbQI1ub
+fpCj7ECgYAd69soLEybUGMjsdI+OijIGoUTUoZGXJm+0VpBt4QJCe7AMnYPfYzA
JnEmN4D7HLTKUBklQnb/FhP/RuiT2bSAd1l+PNeuU7gYROCBBonzxXQ1wEbNrSYA
iyoc9g/kvV8HTW8361xEhu7wmuSEEx1gQ/7sdhTkgrTncc8hxVRxuA==
-----END RSA PRIVATE KEY-----
{{ .private_key }}
EOF
public_key = <<EOF
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2ymVc24BoaZb0ElXoI3X
4zUKJGZEetR6F4yT1tJhkPDg7UTmiNoFB5TZJvP6LBrrSwszkpZbxaVOkBrwrGbq
FUaXPgud8VabfHl0imXvN746zmpjYEMGqJzm+Gh6aBWOlnPdLuHhds/kcanFAEpp
j5yN0tVWDnqjOJjR7EpxMSdP3TSd6tNAY73LGNLNJQc6tSxh8nMIb4HhSWQSgfof
+FwcLGvs+mmyBq8Jz5Zy4BSCk1fQFmCnSGyzpyBD0vMd6eLHk2l0tm56DrlonbDM
X8KGs7e9ZgjANkT5PnipLOaeLJU4H+OWyBZUAT4hl/iRVvLwV81x7g0/O38kmPYJ
DQIDAQAB
-----END PUBLIC KEY-----
{{ .public_key }}
EOF
lifecycle {
ignore_changes = [
Expand All @@ -168,10 +134,12 @@ EOF
key = artifactory_federated_alpine_repository.{{ .repo_name }}.id
}
`, map[string]interface{}{
"kp_id": kpId,
"kp_name": kpName,
"repo_name": name,
"memberUrl": federatedMemberUrl,
"kp_id": kpId,
"kp_name": kpName,
"repo_name": name,
"memberUrl": federatedMemberUrl,
"private_key": os.Getenv("JFROG_TEST_RSA_PRIVATE_KEY"),
"public_key": os.Getenv("JFROG_TEST_RSA_PUBLIC_KEY"),
}) // we use randomness so that, in the case of failure and dangle, the next test can run without collision

fqrn := "data." + tempFqrn
Expand Down Expand Up @@ -209,44 +177,10 @@ func TestAccDataSourceFederatedAnsibleRepository(t *testing.T) {
pair_type = "RSA"
alias = "foo-alias{{ .kp_id }}"
private_key = <<EOF
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA2ymVc24BoaZb0ElXoI3X4zUKJGZEetR6F4yT1tJhkPDg7UTm
iNoFB5TZJvP6LBrrSwszkpZbxaVOkBrwrGbqFUaXPgud8VabfHl0imXvN746zmpj
YEMGqJzm+Gh6aBWOlnPdLuHhds/kcanFAEppj5yN0tVWDnqjOJjR7EpxMSdP3TSd
6tNAY73LGNLNJQc6tSxh8nMIb4HhSWQSgfof+FwcLGvs+mmyBq8Jz5Zy4BSCk1fQ
FmCnSGyzpyBD0vMd6eLHk2l0tm56DrlonbDMX8KGs7e9ZgjANkT5PnipLOaeLJU4
H+OWyBZUAT4hl/iRVvLwV81x7g0/O38kmPYJDQIDAQABAoIBAFb7wyhEIfuhhlE9
uryrb2LrGzJlMIq7qBWOouKhLz4SjIM/VGw+c76VkjZGoSU+LeLj+D0W1ie0u2Cw
gJM8aW22TbK/c5lksWOO5PVFDdPG+ZoRWY3MLGlhlL5E4UhMPgJyy/eeiRjZ3CZM
pja+UfVAwn1KVNR8UinVZYPt680AvEd1FGxoNLxemIPNug46nNqp6Al86Bn+BnkN
GXpwyooXVSfo4k+pnFBFIXUdA1dUEXQSVb1AxlTo6g/Ok/+8Gfq8idCdu+5fcZI2
1eLeC+FAa92rr1SFX/UWeB4cMyuAqwuxbFFIplT22SaUSsNuOUSH4E00nbP/AuCb
1BqrLmECgYEA7tQKfyF9ai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FUaXPgud8VabfHl0imXvN746zmpjYEMGqJzm+Gh6aBWOlnPdLuHhds/kcanFAEpp
j5yN0tVWDnqjOJjR7EpxMSdP3TSd6tNAY73LGNLNJQc6tSxh8nMIb4HhSWQSgfof
+FwcLGvs+mmyBq8Jz5Zy4BSCk1fQFmCnSGyzpyBD0vMd6eLHk2l0tm56DrlonbDM
X8KGs7e9ZgjANkT5PnipLOaeLJU4H+OWyBZUAT4hl/iRVvLwV81x7g0/O38kmPYJ
DQIDAQAB
-----END PUBLIC KEY-----
{{ .public_key }}
EOF
lifecycle {
ignore_changes = [
Expand All @@ -269,10 +203,12 @@ EOF
key = artifactory_federated_ansible_repository.{{ .repo_name }}.id
}
`, map[string]interface{}{
"kp_id": kpId,
"kp_name": kpName,
"repo_name": name,
"memberUrl": federatedMemberUrl,
"kp_id": kpId,
"kp_name": kpName,
"repo_name": name,
"memberUrl": federatedMemberUrl,
"private_key": os.Getenv("JFROG_TEST_RSA_PRIVATE_KEY"),
"public_key": os.Getenv("JFROG_TEST_RSA_PUBLIC_KEY"),
}) // we use randomness so that, in the case of failure and dangle, the next test can run without collision

fqrn := "data." + tempFqrn
Expand Down Expand Up @@ -444,37 +380,10 @@ func TestAccDataSourceFederatedDebianRepository(t *testing.T) {
pair_type = "GPG"
alias = "foo-alias{{ .kp_id }}"
private_key = <<EOF
-----BEGIN PGP PRIVATE KEY BLOCK-----
lIYEYYU7tRYJKwYBBAHaRw8BAQdAZ8vVdEyrWGssb7cdreG5GDGv6taHX/vWQdDG
jn7zib/+BwMCFjb4odY28+n0NWj7KZ53BkA0qzzqT9IpIfsW/tLNPTxYEFrDVbcF
1CuiAgAhyUfBEr9HQaMJBLfIIvo/B3nlWvwWHkiQFuWpsnJ2pj8F8LQqQ2hyaXN0
aWFuIEJvbmdpb3JubyA8Y2hyaXN0aWFuYkBqZnJvZy5jb20+iJoEExYKAEIWIQSS
w8jt+9pdVC3Gts7AvzSEkhHbJAUCYYU7tQIbAwUJA8JnAAULCQgH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sk1H8BAJCMZaWOY/yliPqiE/xs7BUH
hUTmrGN19ZC8EJQDQsXCAQDEsZV5PzynDf7HsLB3tKy7GUg44IgmywWdSED1Cyrb
AQ==
=2kMe
-----END PGP PUBLIC KEY BLOCK-----
{{ .public_key }}
EOF
lifecycle {
ignore_changes = [
Expand All @@ -489,37 +398,10 @@ EOF
pair_type = "GPG"
alias = "foo-alias{{ .kp_id2 }}"
private_key = <<EOF
-----BEGIN PGP PRIVATE KEY BLOCK-----
lIYEYYU7tRYJKwYBBAHaRw8BAQdAZ8vVdEyrWGssb7cdreG5GDGv6taHX/vWQdDG
jn7zib/+BwMCFjb4odY28+n0NWj7KZ53BkA0qzzqT9IpIfsW/tLNPTxYEFrDVbcF
1CuiAgAhyUfBEr9HQaMJBLfIIvo/B3nlWvwWHkiQFuWpsnJ2pj8F8LQqQ2hyaXN0
aWFuIEJvbmdpb3JubyA8Y2hyaXN0aWFuYkBqZnJvZy5jb20+iJoEExYKAEIWIQSS
w8jt+9pdVC3Gts7AvzSEkhHbJAUCYYU7tQIbAwUJA8JnAAULCQgHAgMiAgEGFQoJ
CAsCBBYCAwECHgcCF4AACgkQwL80hJIR2yRQDgD/X1t/hW9+uXdSY59FOClhQw/t
AzTYjDW+KLKadYJ3RAIBALD53rj7EnrXsSqv9Vqj3mJ7O38eXu50P57tD8ErpHMD
nIsEYYU7tRIKKwYBBAGXVQEFAQEHQCfT+jXHVkslGAJqVafoeWO8Nwz/oPPzNDJb
EOASsMRcAwEIB/4HAwK+Wi8OaidLuvQ6yknLUspoRL8KJlQu0JkfLxj6Wl6GrRtf
MdUBxaGUQX5UzMIqyYstgHKz2kBYvrJijWdOkkRuL82FySSh4yi/97FBikOBiHgE
GBYKACAWIQSSw8jt+9pdVC3Gts7AvzSEkhHbJAUCYYU7tQIbDAAKCRDAvzSEkhHb
JNR/AQCQjGWljmP8pYj6ohP8bOwVB4VE5qxjdfWQvBCUA0LFwgEAxLGVeT88pw3+
x7Cwd7SsuxlIOOCIJssFnUhA9Qsq2wE=
=qCzy
-----END PGP PRIVATE KEY BLOCK-----
{{ .private_key }}
EOF
public_key = <<EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEYYU7tRYJKwYBBAHaRw8BAQdAZ8vVdEyrWGssb7cdreG5GDGv6taHX/vWQdDG
jn7zib+0KkNocmlzdGlhbiBCb25naW9ybm8gPGNocmlzdGlhbmJAamZyb2cuY29t
PoiaBBMWCgBCFiEEksPI7fvaXVQtxrbOwL80hJIR2yQFAmGFO7UCGwMFCQPCZwAF
CwkIBwIDIgIBBhUKCQgLAgQWAgMBAh4HAheAAAoJEMC/NISSEdskUA4A/19bf4Vv
frl3UmOfRTgpYUMP7QM02Iw1viiymnWCd0QCAQCw+d64+xJ617Eqr/Vao95iezt/
Hl7udD+e7Q/BK6RzA7g4BGGFO7USCisGAQQBl1UBBQEBB0An0/o1x1ZLJRgCalWn
6HljvDcM/6Dz8zQyWxDgErDEXAMBCAeIeAQYFgoAIBYhBJLDyO372l1ULca2zsC/
NISSEdskBQJhhTu1AhsMAAoJEMC/NISSEdsk1H8BAJCMZaWOY/yliPqiE/xs7BUH
hUTmrGN19ZC8EJQDQsXCAQDEsZV5PzynDf7HsLB3tKy7GUg44IgmywWdSED1Cyrb
AQ==
=2kMe
-----END PGP PUBLIC KEY BLOCK-----
{{ .public_key }}
EOF
lifecycle {
ignore_changes = [
Expand Down Expand Up @@ -558,6 +440,8 @@ EOF
"repo_name": name,
"trivialLayout": true,
"memberUrl": federatedMemberUrl,
"private_key": os.Getenv("JFROG_TEST_PGP_PRIVATE_KEY"),
"public_key": os.Getenv("JFROG_TEST_PGP_PUBLIC_KEY"),
}) // we use randomness so that, in the case of failure and dangle, the next test can run without collision

federatedRepositoryUpdated := util.ExecuteTemplate("keypair", template, map[string]interface{}{
Expand All @@ -568,6 +452,8 @@ EOF
"repo_name": name,
"trivialLayout": false,
"memberUrl": federatedMemberUrl,
"private_key": os.Getenv("JFROG_TEST_PGP_PRIVATE_KEY"),
"public_key": os.Getenv("JFROG_TEST_PGP_PUBLIC_KEY"),
})

fqrn := "data." + tempFqrn
Expand Down Expand Up @@ -1137,37 +1023,10 @@ func TestAccDataSourceFederatedRpmRepository(t *testing.T) {
pair_type = "GPG"
alias = "foo-alias{{ .kp_id }}"
private_key = <<EOF
-----BEGIN PGP PRIVATE KEY BLOCK-----
lIYEYYU7tRYJKwYBBAHaRw8BAQdAZ8vVdEyrWGssb7cdreG5GDGv6taHX/vWQdDG
jn7zib/+BwMCFjb4odY28+n0NWj7KZ53BkA0qzzqT9IpIfsW/tLNPTxYEFrDVbcF
1CuiAgAhyUfBEr9HQaMJBLfIIvo/B3nlWvwWHkiQFuWpsnJ2pj8F8LQqQ2hyaXN0
aWFuIEJvbmdpb3JubyA8Y2hyaXN0aWFuYkBqZnJvZy5jb20+iJoEExYKAEIWIQSS
w8jt+9pdVC3Gts7AvzSEkhHbJAUCYYU7tQIbAwUJA8JnAAULCQgHAgMiAgEGFQoJ
CAsCBBYCAwECHgcCF4AACgkQwL80hJIR2yRQDgD/X1t/hW9+uXdSY59FOClhQw/t
AzTYjDW+KLKadYJ3RAIBALD53rj7EnrXsSqv9Vqj3mJ7O38eXu50P57tD8ErpHMD
nIsEYYU7tRIKKwYBBAGXVQEFAQEHQCfT+jXHVkslGAJqVafoeWO8Nwz/oPPzNDJb
EOASsMRcAwEIB/4HAwK+Wi8OaidLuvQ6yknLUspoRL8KJlQu0JkfLxj6Wl6GrRtf
MdUBxaGUQX5UzMIqyYstgHKz2kBYvrJijWdOkkRuL82FySSh4yi/97FBikOBiHgE
GBYKACAWIQSSw8jt+9pdVC3Gts7AvzSEkhHbJAUCYYU7tQIbDAAKCRDAvzSEkhHb
JNR/AQCQjGWljmP8pYj6ohP8bOwVB4VE5qxjdfWQvBCUA0LFwgEAxLGVeT88pw3+
x7Cwd7SsuxlIOOCIJssFnUhA9Qsq2wE=
=qCzy
-----END PGP PRIVATE KEY BLOCK-----
{{ .private_key }}
EOF
public_key = <<EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEYYU7tRYJKwYBBAHaRw8BAQdAZ8vVdEyrWGssb7cdreG5GDGv6taHX/vWQdDG
jn7zib+0KkNocmlzdGlhbiBCb25naW9ybm8gPGNocmlzdGlhbmJAamZyb2cuY29t
PoiaBBMWCgBCFiEEksPI7fvaXVQtxrbOwL80hJIR2yQFAmGFO7UCGwMFCQPCZwAF
CwkIBwIDIgIBBhUKCQgLAgQWAgMBAh4HAheAAAoJEMC/NISSEdskUA4A/19bf4Vv
frl3UmOfRTgpYUMP7QM02Iw1viiymnWCd0QCAQCw+d64+xJ617Eqr/Vao95iezt/
Hl7udD+e7Q/BK6RzA7g4BGGFO7USCisGAQQBl1UBBQEBB0An0/o1x1ZLJRgCalWn
6HljvDcM/6Dz8zQyWxDgErDEXAMBCAeIeAQYFgoAIBYhBJLDyO372l1ULca2zsC/
NISSEdskBQJhhTu1AhsMAAoJEMC/NISSEdsk1H8BAJCMZaWOY/yliPqiE/xs7BUH
hUTmrGN19ZC8EJQDQsXCAQDEsZV5PzynDf7HsLB3tKy7GUg44IgmywWdSED1Cyrb
AQ==
=2kMe
-----END PGP PUBLIC KEY BLOCK-----
{{ .public_key }}
EOF
lifecycle {
ignore_changes = [
Expand All @@ -1182,37 +1041,10 @@ EOF
pair_type = "GPG"
alias = "foo-alias{{ .kp_id2 }}"
private_key = <<EOF
-----BEGIN PGP PRIVATE KEY BLOCK-----
lIYEYYU7tRYJKwYBBAHaRw8BAQdAZ8vVdEyrWGssb7cdreG5GDGv6taHX/vWQdDG
jn7zib/+BwMCFjb4odY28+n0NWj7KZ53BkA0qzzqT9IpIfsW/tLNPTxYEFrDVbcF
1CuiAgAhyUfBEr9HQaMJBLfIIvo/B3nlWvwWHkiQFuWpsnJ2pj8F8LQqQ2hyaXN0
aWFuIEJvbmdpb3JubyA8Y2hyaXN0aWFuYkBqZnJvZy5jb20+iJoEExYKAEIWIQSS
w8jt+9pdVC3Gts7AvzSEkh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SEdskBQJhhTu1AhsMAAoJEMC/NISSEdsk1H8BAJCMZaWOY/yliPqiE/xs7BUH
hUTmrGN19ZC8EJQDQsXCAQDEsZV5PzynDf7HsLB3tKy7GUg44IgmywWdSED1Cyrb
AQ==
=2kMe
-----END PGP PUBLIC KEY BLOCK-----
{{ .public_key }}
EOF
lifecycle {
ignore_changes = [
Expand Down Expand Up @@ -1254,6 +1086,8 @@ EOF
"yum_root_depth": 1,
"enable_file_lists_indexing": true,
"memberUrl": federatedMemberUrl,
"private_key": os.Getenv("JFROG_TEST_PGP_PRIVATE_KEY"),
"public_key": os.Getenv("JFROG_TEST_PGP_PUBLIC_KEY"),
}) // we use randomness so that, in the case of failure and dangle, the next test can run without collision

federatedRepositoryUpdated := util.ExecuteTemplate("keypair", template, map[string]interface{}{
Expand All @@ -1265,6 +1099,8 @@ EOF
"yum_root_depth": 2,
"enable_file_lists_indexing": false,
"memberUrl": federatedMemberUrl,
"private_key": os.Getenv("JFROG_TEST_PGP_PRIVATE_KEY"),
"public_key": os.Getenv("JFROG_TEST_PGP_PUBLIC_KEY"),
})

fqrn := "data." + tempFqrn
Expand Down
Loading

0 comments on commit b0a18ec

Please sign in to comment.