diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1ef22af --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +- TBA + +## [1.1.0] - 2024-02-15 + +### Removed + +- Removed sample keys for signing and verifying playbooks. + +## [1.0.0] - 2024-01-17 + +### Added + +- Version 1.0.0 of the CACAO Roaster. diff --git a/package.json b/package.json index c47dc60..a054ec2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cacao-roaster", - "version": "1.0.0", + "version": "1.1.0", "main": "index.js", "scripts": { "prepare": "husky install", diff --git a/src/app/UserSettingsProps.ts b/src/app/UserSettingsProps.ts index 5082747..8c15d61 100644 --- a/src/app/UserSettingsProps.ts +++ b/src/app/UserSettingsProps.ts @@ -7,21 +7,11 @@ export default class UserSettingsProps { identifier: Identifier = 'identity--' + uuidv4(); private identifierPattern = '^[a-z][a-z0-9-]+[a-z0-9]--[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$'; - secretKey: string = - '-----BEGIN RSA PRIVATE KEY-----MIICWwIBAAKBgQDRhGF7X4A0ZVlEg594WmODVVUIiiPQs04aLmvfg8SborHss5gQXu0aIdUT6nb5rTh5hD2yfpF2WIW6M8z0WxRhwicgXwi80H1aLPf6lEPPLvN29EhQNjBpkFkAJUbS8uuhJEeKw0cE49g80eBBF4BCqSL6PFQbP9/rByxdxEoAIQIDAQABAoGAA9/q3Zk6ib2GFRpKDLO/O2KMnAfR+b4XJ6zMGeoZ7Lbpi3MW0Nawk9ckVaX0ZVGqxbSIX5Cvp/yjHHpww+QbUFrw/gCjLiiYjM9E8C3uAF5AKJ0r4GBPl4u8K4bpbXeSxSB60/wPQFiQAJVcA5xhZVzqNuF3EjuKdHsw+dk+dPECQQDubX/lVGFgD/xYuchz56Yc7VHX+58BUkNSewSzwJRbcueqknXRWwj97SXqpnYfKqZq78dnEF10SWsr/NMKi+7XAkEA4PVqDv/OZAbWr4syXZNv/Mpl4r5suzYMMUD9U8B2JIRnrhmGZPzLx23N9J4hEJ+Xh8tSKVc80jOkrvGlSv+BxwJAaTOtjA3YTV+gU7Hdza53sCnSw/8FYLrgc6NOJtYhX9xqdevbyn1lkU0zPr8mPYg/F84m6MXixm2iuSz8HZoyzwJARi2paYZ5/5B2lwroqnKdZBJMGKFpUDn7Mb5hiSgocxnvMkv6NjT66Xsi3iYakJII9q8CMa1qZvT/cigmdbAh7wJAQNXyoizuGEltiSaBXx4H29EdXNYWDJ9SS5f070BRbAIldqRh3rcNvpY6BKJqFapda1DjdcncZECMizT/GMrc1w==-----END RSA PRIVATE KEY-----'; - private secretKeyPattern = - '^-----BEGIN PRIVATE KEY-----(.*)-----END PRIVATE KEY-----$'; - publicKey: string = - '-----BEGIN CERTIFICATE-----MIIBvTCCASYCCQD55fNzc0WF7TANBgkqhkiG9w0BAQUFADAjMQswCQYDVQQGEwJKUDEUMBIGA1UEChMLMDAtVEVTVC1SU0EwHhcNMTAwNTI4MDIwODUxWhcNMjAwNTI1MDIwODUxWjAjMQswCQYDVQQGEwJKUDEUMBIGA1UEChMLMDAtVEVTVC1SU0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANGEYXtfgDRlWUSDn3haY4NVVQiKI9CzThoua9+DxJuiseyzmBBe7Roh1RPqdvmtOHmEPbJ+kXZYhbozzPRbFGHCJyBfCLzQfVos9/qUQ88u83b0SFA2MGmQWQAlRtLy66EkR4rDRwTj2DzR4EEXgEKpIvo8VBs/3+sHLF3ESgAhAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAEZ6mXFFq3AzfaqWHmCy1ARjlauYAa8ZmUFnLm0emg9dkVBJ63aEqARhtok6bDQDzSJxiLpCEF6G4b/Nv/M/MLyhP+OoOTmETMegAVQMq71choVJyOFE5BtQa6M/lCHEOya5QUfoRF2HF9EjRF44K3OK+u3ivTSj3zwjtpudY5Xo=-----END CERTIFICATE-----'; - private publicKeyPattern = - '^-----BEGIN PUBLIC KEY-----(.*)-----END PUBLIC KEY-----$'; - - private UserSettingsProps() {} + secretKey: string = ''; + publicKey: string = ''; get isFulfil(): boolean { - return ( - this.identifier != '' && this.secretKey != '' && this.publicKey != '' - ); + return this.identifier != '' && this.secretKey != '' && this.publicKey != ''; } showDialog() { @@ -44,14 +34,14 @@ export default class UserSettingsProps { ); dialog.appendChild(identifierContainer); let secretKeyContainer = getPropertyHTMLElement( - 'Secret key (Beta)', + 'Secret key (beta - for experimental purposes only)', 'secretKey', 'textarea', this.secretKey, ); dialog.appendChild(secretKeyContainer); let publicKeyContainer = getPropertyHTMLElement( - 'Public key (Beta)', + 'Public key (beta - for experimental purposes only)', 'publicKey', 'textarea', this.publicKey, @@ -73,15 +63,15 @@ export default class UserSettingsProps { return new Promise(resolve => { confirm.addEventListener('click', () => { - let identifier = identifierContainer.getElementsByClassName( - 'property__input', - )[0] as HTMLInputElement | HTMLTextAreaElement; - let publicKey = publicKeyContainer.getElementsByClassName( - 'property__input', - )[0] as HTMLInputElement | HTMLTextAreaElement; - let secretKey = secretKeyContainer.getElementsByClassName( - 'property__input', - )[0] as HTMLInputElement | HTMLTextAreaElement; + let identifier = identifierContainer.getElementsByClassName('property__input')[0] as + | HTMLInputElement + | HTMLTextAreaElement; + let publicKey = publicKeyContainer.getElementsByClassName('property__input')[0] as + | HTMLInputElement + | HTMLTextAreaElement; + let secretKey = secretKeyContainer.getElementsByClassName('property__input')[0] as + | HTMLInputElement + | HTMLTextAreaElement; let correct = true; if (!passRegex(identifier.value, this.identifierPattern)) {