Repository navigation
NAS-144563 / 28.0.0-BETA.1 / Add E2E coverage for importing, editing, viewing and deleting a certificate #14465
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
Merged
Merged
Changes from all commits
Commits
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 hidden or 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
This file contains hidden or 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
This file contains hidden or 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,66 @@ | ||
| /** | ||
| * A fixed, test-only self-signed certificate and its private key, for the | ||
| * Import Certificate journey. | ||
| * | ||
| * Checked in rather than generated per run because Node's crypto can make a key | ||
| * pair but cannot sign an X.509 certificate without a library. Neither is a | ||
| * credential for anything: the key signs only this certificate, and the | ||
| * certificate names a host under `example.com`. | ||
| * | ||
| * RSA 2048, SHA256, valid from 2026-01-01 to 2076-01-01. The key is unencrypted | ||
| * PKCS#8, the form middleware re-exports an imported key in, so the key the | ||
| * appliance hands back is the one imported here apart from a trailing newline. | ||
| */ | ||
|
|
||
| /** The certificate's subject common name, and its one SAN. */ | ||
| export const testCertificateCommon = 'e2e-import.example.com'; | ||
|
|
||
| export const testCertificatePem = '-----BEGIN CERTIFICATE-----\n' | ||
| + 'MIIDTzCCAjegAwIBAgIUZuIZf7Ev+nTzmLmBHQuy9rJXf+QwDQYJKoZIhvcNAQEL\n' | ||
| + 'BQAwRjELMAkGA1UEBhMCVV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fRwb8NQC4Kzo/JAI2HEMwFEZ\n' | ||
| + 'AntWPHK/YDbA7J2PE1ZVDEgiHR77xP8x9lT/jrdLtz2L+wzpZV2E6QurmHYwEhdz\n' | ||
| + 'kk4HA8DID1OCCRvO3xEYMdEdAmLMZSci9Q1J8uKvgmAhjXA=\n' | ||
| + '-----END CERTIFICATE-----'; | ||
|
|
||
| export const testPrivateKeyPem = '-----BEGIN PRIVATE KEY-----\n' | ||
| + 'MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCrMHKIMXXKyKI7\n' | ||
| + '/2KsmaeaHK0yCKWLAYCDlIJfBd9k8dOnehlEQ/ZkimI9tsaZEse5CeCfO4A/SDVb\n' | ||
| + 'FjqD3dDzYxQN4Y756RGLMXxwZZffvmHwQ52nXErEnz224e4sDb/h4cW4JoghlQu1\n' | ||
| + '3XYmTjGN9LW9G8+LoYplvhLiwO6QAm2jJrKcBunyfw4oJEvjT+7YcIqzrU+/oq55\n' | ||
| + 'd+gSm8PfkV10rJU7d7Hp/mSdkhG0z+/U8hP7tdhlJ5GlaDYTM9hsuXcMFx72/Ul6\n' | ||
| + '9eK8COVkqeRTe+avohLWdwjPIjUSDk2s/8I7HmmcV3wEPbm1x+rFKYrvFliZAE8C\n' | ||
| + 'PPrklIrZAgMBAAECggEAAVkF9rPdR5STPMaAWzn13ne9oCVm1ixAvkh0LsBMFcOz\n' | ||
| + 'QyTW+wwzHVNy6sa5tz+dh0rbipE9inYmqmxvv3/gyfYygaqB8VMnfonAMz0l9vzg\n' | ||
| + 'BVU6Dnv1fdh//Y0DXOgqzhYfSWCRnboRcyBkX3oXFWplYo+5AlJgoWlkdL7blhvC\n' | ||
| + 'ltnANQ7GfoeZqQyHAZE9i3rI+GGJrgUUMW2m6OVOuEj7WpR8BrS1Akx+YpR51C7n\n' | ||
| + 'LoQUp7sKH5Y1bYoRaEbFRt6+tNK/5xD04mGWd4SvCaMlLwkcJvRF+cvzSS8b9mRD\n' | ||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sR9GHLNxDlRn/p5mzj5G3g==\n' | ||
| + '-----END PRIVATE KEY-----'; |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
LOW —
importForm.addToTrustedStoreisn't used anywhere: the import test leaves the flag at its default, and onlyeditForm.addToTrustedStoregets.check()ed. The PR description says this is on purpose. Two cheap ways to make it earn its place: have the import test assert the box starts unchecked (await expect(page.locator(importForm.addToTrustedStore)).not.toBeChecked()), or drop it until a test needs it. 🙂