Skip to content

Commit

Permalink
Merge pull request #9 from cyentific-rni/main
Browse files Browse the repository at this point in the history
Removed sample keys for signing and veryfing playbooks + changelog.md. Version 1.0.0 -> 1.1.0.
  • Loading branch information
mateusdz committed Feb 15, 2024
2 parents 2dc4aa8 + a03a31c commit 4754c33
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 25 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cacao-roaster",
"version": "1.0.0",
"version": "1.1.0",
"main": "index.js",
"scripts": {
"prepare": "husky install",
Expand Down
38 changes: 14 additions & 24 deletions src/app/UserSettingsProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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,
Expand All @@ -73,15 +63,15 @@ export default class UserSettingsProps {

return new Promise<boolean>(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)) {
Expand Down

0 comments on commit 4754c33

Please sign in to comment.