Skip to content

Commit

Permalink
backup
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkhala committed Jul 7, 2024
1 parent 811573c commit 67312f8
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/aurora/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Aurora

## Database authentication
- IAM DB Auth (optional)
18 changes: 18 additions & 0 deletions msk/node/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import KafkaManager from '@davidkhala/kafka/index.js';

import {generateAuthToken} from 'aws-msk-iam-sasl-signer-js';

export default class MSK extends KafkaManager {
constructor(brokers) {
const sasl = {
mechanism: 'oauthbearer',
oauthBearerProvider: async () => {
const authTokenResponse = await generateAuthToken();
return {
value: authTokenResponse.token
};
}
};
super(brokers, {sasl});
}
}
23 changes: 23 additions & 0 deletions msk/node/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@davidkhala/aws-msk",
"version": "0.0.0",
"main": "index.js",
"scripts": {
"test": "mocha test"
},
"devDependencies": {
"mocha": "latest"
},
"dependencies": {
"@davidkhala/kafka": "latest",
"aws-msk-iam-sasl-signer-js": "latest"
},
"repository": {
"type": "git",
"url": "https://github.com/davidkhala/aws-collections.git"
},
"publishConfig": {
"access": "public"
},
"type": "module"
}
1 change: 1 addition & 0 deletions msk/node/test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// TODO WIP

0 comments on commit 67312f8

Please sign in to comment.