GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — typings: add credentials internal binding types by HoonDongKang · Pull Request #65036 · nodejs/node

Conversation

@HoonDongKang

@HoonDongKang HoonDongKang commented Aug 5, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Add typings for the credentials internal binding.

Changes:

  • Added typings/internalBinding/credentials.d.ts
  • Added credentials to InternalBindingMap
  • Typed safeGetenv() and getTempDir()
  • Typed optional POSIX credential helpers exposed during bootstrap:
    • implementsPosixCredentials
    • getuid?()
    • geteuid?()
    • getgid?()
    • getegid?()
    • getgroups?()
    • initgroups?()
    • setegid?()
    • seteuid?()
    • setgid?()
    • setuid?()
    • setgroups?()

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@HoonDongKang
typings: add credentials internal binding types
3138832
Add a CredentialsBinding declaration for internalBinding('credentials')
and wire it into InternalBindingMap.

Signed-off-by: HoonDongKang <[email protected]>
@nodejs-github-bot nodejs-github-bot added the typings Issues and PRs related to internal TypeScript declarations. label Aug 5, 2026
@daeyeon

daeyeon commented Aug 9, 2026

Copy link
Copy Markdown
Member

These methods appear to be optional, as they are not available on every platform.

node/src/node_credentials.cc

Lines 504 to 523 in e6fa5bf

#ifdef NODE_IMPLEMENTS_POSIX_CREDENTIALS
Environment* env = Environment::GetCurrent(context);
Isolate* isolate = env->isolate();
READONLY_TRUE_PROPERTY(target, "implementsPosixCredentials");
SetMethodNoSideEffect(context, target, "getuid", GetUid);
SetMethodNoSideEffect(context, target, "geteuid", GetEUid);
SetMethodNoSideEffect(context, target, "getgid", GetGid);
SetMethodNoSideEffect(context, target, "getegid", GetEGid);
SetMethodNoSideEffect(context, target, "getgroups", GetGroups);
if (env->owns_process_state()) {
SetMethod(context, target, "initgroups", InitGroups);
SetMethod(context, target, "setegid", SetEGid);
SetMethod(context, target, "seteuid", SetEUid);
SetMethod(context, target, "setgid", SetGid);
SetMethod(context, target, "setuid", SetUid);
SetMethod(context, target, "setgroups", SetGroups);
}
#endif // NODE_IMPLEMENTS_POSIX_CREDENTIALS

HoonDongKang reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@HoonDongKang
typings: make credentials methods optional
933f513
Signed-off-by: HoonDongKang <[email protected]>
@HoonDongKang

HoonDongKang commented Aug 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Thanks for the review. I missed that these methods can be conditionally exposed.

I kept safeGetenv() and getTempDir() required, and updated the POSIX credential helpers to be optional.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daeyeon daeyeon added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. commit-queue-squash PRs the Commit Queue should land as one squashed commit. labels Aug 11, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Aug 11, 2026
@nodejs-github-bot

nodejs-github-bot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/65036
✔  Done loading data for nodejs/node/pull/65036
----------------------------------- PR info ------------------------------------
Title      typings: add credentials internal binding types (#65036)
Author     Donghoon Kang <[email protected]> (@HoonDongKang)
Branch     HoonDongKang:typings-internalbinding-credentials -> nodejs:main
Labels     author ready, commit-queue, typings, commit-queue-squash
Commits    2
 - typings: add credentials internal binding types
 - typings: make credentials methods optional
Committers 1
 - HoonDongKang <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/65036
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/65036
--------------------------------------------------------------------------------
   ⚠  No approving reviews found
   ℹ  This PR was created on Wed, 05 Aug 2026 06:24:41 GMT
   ✘  Approvals: 0
   ✔  Last GitHub CI successful
   ℹ  Green GitHub CI is sufficient
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/31461424057
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

daeyeon
daeyeon approved these changes Aug 11, 2026
View reviewed changes
@daeyeon daeyeon added commit-queue PRs queued for automated landing through the Commit Queue. and removed commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. labels Aug 11, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 69bf457 into nodejs:main Aug 12, 2026
34 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Landed in 69bf457

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Aug 12, 2026
aduh95 pushed a commit that referenced this pull request Aug 13, 2026
@HoonDongKang @aduh95
typings: add credentials internal binding types
d359a24
Add a CredentialsBinding declaration for internalBinding('credentials')
and wire it into InternalBindingMap.

Signed-off-by: HoonDongKang <[email protected]>
PR-URL: #65036
Reviewed-By: Daeyeon Jeong <[email protected]>
aduh95 pushed a commit that referenced this pull request Aug 25, 2026
@HoonDongKang @aduh95
typings: add credentials internal binding types
9fc811a
Add a CredentialsBinding declaration for internalBinding('credentials')
and wire it into InternalBindingMap.

Signed-off-by: HoonDongKang <[email protected]>
PR-URL: #65036
Reviewed-By: Daeyeon Jeong <[email protected]>
@github-actions github-actions Bot mentioned this pull request Aug 25, 2026
2026-08-26, Version 26.8.0 (Current) #65551
Merged
HoonDongKang added a commit to HoonDongKang/board that referenced this pull request Aug 27, 2026
@HoonDongKang
docs: add contribution note for nodejs/node#65036
3adbfd0
aduh95 pushed a commit that referenced this pull request Aug 27, 2026
@HoonDongKang @aduh95
typings: add credentials internal binding types
f15e8c9
Add a CredentialsBinding declaration for internalBinding('credentials')
and wire it into InternalBindingMap.

Signed-off-by: HoonDongKang <[email protected]>
PR-URL: #65036
Reviewed-By: Daeyeon Jeong <[email protected]>
@github-actions github-actions Bot mentioned this pull request Sep 7, 2026
2026-09-08, Version 24.21.0 'Krypton' (LTS) #65873
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@daeyeon daeyeon daeyeon approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-squash PRs the Commit Queue should land as one squashed commit. typings Issues and PRs related to internal TypeScript declarations.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@HoonDongKang @daeyeon @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.