-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for AsyncAPI v3 (#186)
* chore: upgrade AsyncAPI generator dependency As a first step towards updating the template to support AsyncAPI v3 documents, this commit upgrades to the current version of the generator. Signed-off-by: Dale Lane <[email protected]> * feat: v3 support Support for generating Java projects from v3 documents, using the streetlights example from the spec repo. Signed-off-by: Dale Lane <[email protected]> * fix: reduce complexity to satisfy linter Moving the security protocol out to a separate function Signed-off-by: Dale Lane <[email protected]> * chore: linter updates Running the linter on the modified files Signed-off-by: Dale Lane <[email protected]> * refactor: reduce duplicate code in modified test files Signed-off-by: Dale Lane <[email protected]> * chore: move setTimeout outside of async functions ref: jestjs/jest#11543 Signed-off-by: Dale Lane <[email protected]> --------- Signed-off-by: Dale Lane <[email protected]>
- Loading branch information
Showing
29 changed files
with
3,436 additions
and
2,161 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,45 +1,45 @@ | ||
export function MQCipherToJava(cipher) { | ||
// List in line with Oracle JRE mappings from https://ibm.biz/mq-cipher-mappings | ||
const ciphers = { | ||
ECDHE_ECDSA_3DES_EDE_CBC_SHA256: "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", | ||
ECDHE_ECDSA_AES_128_CBC_SHA256: "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", | ||
ECDHE_ECDSA_AES_128_GCM_SHA256: "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", | ||
ECDHE_ECDSA_AES_256_CBC_SHA384: "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", | ||
ECDHE_ECDSA_AES_256_GCM_SHA384: "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", | ||
ECDHE_ECDSA_NULL_SHA256: "TLS_ECDHE_ECDSA_WITH_NULL_SHA", | ||
ECDHE_ECDSA_RC4_128_SHA256: "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", | ||
ECDHE_RSA_3DES_EDE_CBC_SHA256: "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", | ||
ECDHE_RSA_AES_128_CBC_SHA256: "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", | ||
ECDHE_RSA_AES_128_GCM_SHA256: "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", | ||
ECDHE_RSA_AES_256_CBC_SHA384: "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", | ||
ECDHE_RSA_AES_256_GCM_SHA384: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", | ||
ECDHE_RSA_NULL_SHA256: "TLS_ECDHE_RSA_WITH_NULL_SHA", | ||
ECDHE_RSA_RC4_128_SHA256: "TLS_ECDHE_RSA_WITH_RC4_128_SHA", | ||
TLS_RSA_WITH_3DES_EDE_CBC_SHA: "TLS_RSA_WITH_3DES_EDE_CBC_SHA", | ||
TLS_RSA_WITH_AES_128_CBC_SHA: "TLS_RSA_WITH_AES_128_CBC_SHA", | ||
TLS_RSA_WITH_AES_128_CBC_SHA256: "TLS_RSA_WITH_AES_128_CBC_SHA256", | ||
TLS_RSA_WITH_AES_128_GCM_SHA256: "TLS_RSA_WITH_AES_128_GCM_SHA256", | ||
TLS_RSA_WITH_AES_256_CBC_SHA: "TLS_RSA_WITH_AES_256_CBC_SHA", | ||
TLS_RSA_WITH_AES_256_CBC_SHA256: "TLS_RSA_WITH_AES_256_CBC_SHA256", | ||
TLS_RSA_WITH_AES_256_GCM_SHA384: "TLS_RSA_WITH_AES_256_GCM_SHA384", | ||
TLS_RSA_WITH_DES_CBC_SHA: "SSL_RSA_WITH_DES_CBC_SHA", | ||
TLS_RSA_WITH_NULL_SHA256: "TLS_RSA_WITH_NULL_SHA256", | ||
TLS_RSA_WITH_RC4_128_SHA256: "SSL_RSA_WITH_RC4_128_SHA", | ||
ANY_TLS12: "*TLS12", | ||
TLS_AES_128_GCM_SHA256: "TLS_AES_128_GCM_SHA256", | ||
TLS_AES_256_GCM_SHA384: "TLS_AES_256_GCM_SHA384", | ||
TLS_CHACHA20_POLY1305_SHA256: "TLS_CHACHA20_POLY1305_SHA256", | ||
TLS_AES_128_CCM_SHA256: "TLS_AES_128_CCM_SHA256", | ||
TLS_AES_128_CCM_8_SHA256: "TLS_AES_128_CCM_8_SHA256", | ||
ANY: "*ANY", | ||
ANY_TLS13: "*TLS13", | ||
ANY_TLS12_OR_HIGHER: "*TLS12ORHIGHER", | ||
ANY_TLS13_OR_HIGHER: "*TLS13ORHIGHER" | ||
} | ||
// List in line with Oracle JRE mappings from https://ibm.biz/mq-cipher-mappings | ||
const ciphers = { | ||
ECDHE_ECDSA_3DES_EDE_CBC_SHA256: 'TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA', | ||
ECDHE_ECDSA_AES_128_CBC_SHA256: 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256', | ||
ECDHE_ECDSA_AES_128_GCM_SHA256: 'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256', | ||
ECDHE_ECDSA_AES_256_CBC_SHA384: 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384', | ||
ECDHE_ECDSA_AES_256_GCM_SHA384: 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384', | ||
ECDHE_ECDSA_NULL_SHA256: 'TLS_ECDHE_ECDSA_WITH_NULL_SHA', | ||
ECDHE_ECDSA_RC4_128_SHA256: 'TLS_ECDHE_ECDSA_WITH_RC4_128_SHA', | ||
ECDHE_RSA_3DES_EDE_CBC_SHA256: 'TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA', | ||
ECDHE_RSA_AES_128_CBC_SHA256: 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256', | ||
ECDHE_RSA_AES_128_GCM_SHA256: 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256', | ||
ECDHE_RSA_AES_256_CBC_SHA384: 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384', | ||
ECDHE_RSA_AES_256_GCM_SHA384: 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384', | ||
ECDHE_RSA_NULL_SHA256: 'TLS_ECDHE_RSA_WITH_NULL_SHA', | ||
ECDHE_RSA_RC4_128_SHA256: 'TLS_ECDHE_RSA_WITH_RC4_128_SHA', | ||
TLS_RSA_WITH_3DES_EDE_CBC_SHA: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA', | ||
TLS_RSA_WITH_AES_128_CBC_SHA: 'TLS_RSA_WITH_AES_128_CBC_SHA', | ||
TLS_RSA_WITH_AES_128_CBC_SHA256: 'TLS_RSA_WITH_AES_128_CBC_SHA256', | ||
TLS_RSA_WITH_AES_128_GCM_SHA256: 'TLS_RSA_WITH_AES_128_GCM_SHA256', | ||
TLS_RSA_WITH_AES_256_CBC_SHA: 'TLS_RSA_WITH_AES_256_CBC_SHA', | ||
TLS_RSA_WITH_AES_256_CBC_SHA256: 'TLS_RSA_WITH_AES_256_CBC_SHA256', | ||
TLS_RSA_WITH_AES_256_GCM_SHA384: 'TLS_RSA_WITH_AES_256_GCM_SHA384', | ||
TLS_RSA_WITH_DES_CBC_SHA: 'SSL_RSA_WITH_DES_CBC_SHA', | ||
TLS_RSA_WITH_NULL_SHA256: 'TLS_RSA_WITH_NULL_SHA256', | ||
TLS_RSA_WITH_RC4_128_SHA256: 'SSL_RSA_WITH_RC4_128_SHA', | ||
ANY_TLS12: '*TLS12', | ||
TLS_AES_128_GCM_SHA256: 'TLS_AES_128_GCM_SHA256', | ||
TLS_AES_256_GCM_SHA384: 'TLS_AES_256_GCM_SHA384', | ||
TLS_CHACHA20_POLY1305_SHA256: 'TLS_CHACHA20_POLY1305_SHA256', | ||
TLS_AES_128_CCM_SHA256: 'TLS_AES_128_CCM_SHA256', | ||
TLS_AES_128_CCM_8_SHA256: 'TLS_AES_128_CCM_8_SHA256', | ||
ANY: '*ANY', | ||
ANY_TLS13: '*TLS13', | ||
ANY_TLS12_OR_HIGHER: '*TLS12ORHIGHER', | ||
ANY_TLS13_OR_HIGHER: '*TLS13ORHIGHER' | ||
}; | ||
|
||
if (ciphers[cipher] === undefined) { | ||
throw new Error('An invalid cipher spec was provided. Please see https://ibm.biz/mq-cipher-mappings'); | ||
} | ||
if (ciphers[cipher] === undefined) { | ||
throw new Error('An invalid cipher spec was provided. Please see https://ibm.biz/mq-cipher-mappings'); | ||
} | ||
|
||
return ciphers[cipher]; | ||
} | ||
return ciphers[cipher]; | ||
} |
This file contains 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 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 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 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 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 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 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 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 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 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.