Proposal: reject connect() on authentication error
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- node.js, typescript
- Domain
- authentication, backend
Research direction
Start at the public connect() entry point and reproduce the provided authentication configuration with an incorrect sharedKey. Trace how connection and socket errors are surfaced, then verify that the authentication failure is observable through the connect() promise and that the existing error behavior remains covered.
Written by the indexing model from the issue text.
Description
Hi, I have a use case where authentication is required:
const logger = new FluentClient("output", {
socket: {
host: "fluentd.local",
port: 24224,
timeout: 3000,
disableReconnect: true,
tls: {
ca: require('fs').readFileSync('./fluentd.crt'),
},
},
security: {
clientHostname: "client.local",
sharedKey: "incorrect",
username: "ooo",
password: "xxx"
},
});
try {
await logger.connect();
} catch (err) {
/* do something with err */
}
When security is not correctly configured, connect() still resolves.
Though the error could be detected by logger.socketOn('error'), it's not synchronous with connect() and some mechanism to wait for the error (or to ensure no error thrown) is required.
If connect() can reject on error, it would be more easy to determine whether the client is authenticated successfully.
- Dominant language
- TypeScript
- Stars
- 12
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fluent/fluent-logger-forward-node
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
fluent/fluent-logger-forward-node#46 · 3 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
fluent/fluent-logger-forward-node#40 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
fluent/fluent-logger-forward-node#32 · 6 comments ·
All issues in fluent/fluent-logger-forward-node
Similar issues
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Crush Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ElementsProject/cln-application#167 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Quantco/pnpm-licenses#17 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100