Skip to content

Conversation

@cneira
Copy link

@cneira cneira commented Nov 26, 2025

I modified the access keys schema to support temporary keys, their deletion, and the fields required for Secure Token Services (STS) and Identity and Access Management (IAM). I added a script to delete the temporary keys, but my first approach would be to include this in a crontab, but I'm not sure at the moment is that the best approach.

travispaul and others added 17 commits October 24, 2025 20:54
- Update accesskey schema to include: updated, description, and status.
- Update ENG submodule.
Adds CLI tool to manually clean up expired temporary credentials.
Fixes ldapjs search to use event-based pattern and adds rate
limiting (5 concurrent deletes) to prevent Moray overload.
Modifies schema validation to pass operation type and skip
accesskey validation on delete, allowing removal of expired
credentials. Includes documentation in docs/temporary-credentials.md.

Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@cneira cneira requested a review from a team November 26, 2025 22:19
@travispaul
Copy link
Member

I see you pulled in commits from #29 too! Would you mind pulling in the latest commits? I suspect they'll merge pretty cleanly: MANTA-5485...TRITON-2513

I was just about to mark that PR non-draft too so if those changes get pulled in here we can simply close #29 altogether!

@travispaul
Copy link
Member

travispaul commented Dec 1, 2025

Do we need to expose temporary key functionality in CloudAPI and node-triton? What's the intended process for obtaining one of these newer tokens?

Copy link
Contributor

@danmcd danmcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass 0, didn't find much, but it is pass-0 while remote-remote. :)

package.json Outdated
"restify": "2.3.4",
"sshpk": "1.16.1",
"ufds": "^1.7.0",
"ufds": "git+https://github.com/TritonDataCenter/node-ufds.git#8b64c76422819a34e99cda5421e8931892640881",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will get updated with an accompanying node-ufds change? Or am I missing something here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just merged latest changes from TRITON-2513 so this should be fixed.

We need to be able to delete expired temporary access keys
as they are no longer useful. Skipping this check allows that.
@cneira cneira requested review from danmcd and travispaul December 4, 2025 20:00
@cneira cneira marked this pull request as ready for review December 5, 2025 12:43
@cneira
Copy link
Author

cneira commented Dec 5, 2025

I see you pulled in commits from #29 too! Would you mind pulling in the latest commits? I suspect they'll merge pretty cleanly: MANTA-5485...TRITON-2513

I was just about to mark that PR non-draft too so if those changes get pulled in here we can simply close #29 altogether!

Done!

@@ -0,0 +1,228 @@
/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, non-blocker: Maybe this should be renamed to: temporary-accesskey.test.js? Or combined with accesskeys.test.js?

Copy link
Member

@travispaul travispaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some non-blocking nits but otherwise testing has went well for me.

I authored some of the commits here, so not sure how much to value my approval.

Copy link
Member

@travispaul travispaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed some temporary keys from my tests last week were never purged. The cronjob doesn't have node in its path:

[root@b0be2660-17e4-46b7-95aa-53d8116940ae (coal:ufds0) ~]# cat /var/log/ufds-cleanup.log

/usr/bin/env: node: No such file or directory

The script itself works fine because /opt/smartdc/ufds/build/node/bin is in $PATH however that path is not present in /etc/default/cron

@cneira
Copy link
Author

cneira commented Dec 9, 2025

I noticed some temporary keys from my tests last week were never purged. The cronjob doesn't have node in its path:

[root@b0be2660-17e4-46b7-95aa-53d8116940ae (coal:ufds0) ~]# cat /var/log/ufds-cleanup.log

/usr/bin/env: node: No such file or directory

The script itself works fine because /opt/smartdc/ufds/build/node/bin is in $PATH however that path is not present in /etc/default/cron

Thank you! I'm sorry I did not catch this sooner. I'll fix it now.

@cneira cneira requested a review from travispaul December 9, 2025 17:14
travispaul
travispaul previously approved these changes Dec 9, 2025
Add tests for temporary access keys

Co-Authored-By: Claude Sonnet 4.5
<[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants