Skip to content

Draft: PDP-DEVTOOL 6434: Dev Assist proxy:generatekey command#1010

Draft
TheJorgeBorras wants to merge 13 commits intodevfrom
feature/PDPDEVTOOL-6434-dev-assist-proxygeneratekey-command
Draft

Draft: PDP-DEVTOOL 6434: Dev Assist proxy:generatekey command#1010
TheJorgeBorras wants to merge 13 commits intodevfrom
feature/PDPDEVTOOL-6434-dev-assist-proxygeneratekey-command

Conversation

@TheJorgeBorras
Copy link
Copy Markdown
Member

No description provided.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 13, 2026
Comment thread packages/node-cli/src/commands/proxy/generatekey/ProxyGenerateKeyAction.js Outdated
Comment thread packages/node-cli/src/utils/ClientApiKeyUtils.js Outdated
Comment thread packages/node-cli/messages.json Outdated
Comment on lines +313 to +317
"UTILS_CLIENT_API_KEY_UTILS_ERRORS_INVALID_FILE_CONTENTS": "Client API contents must be a valid format. Please, delete client_api_key.p12 file and try again.",
"UTILS_CLIENT_API_KEY_UTILS_ERRORS_READING_FILE_CONTENTS": "Error reading Client API Key file contents.\n{0}",
"UTILS_CLIENT_API_KEY_UTILS_ERRORS_WRITING_FILE_CONTENTS": "Error writing Client API Key file contents.",
"UTILS_CLIENT_API_KEY_UTILS_READING_FILE_CONTENTS": "Reading Client API contents...",
"UTILS_CLIENT_API_KEY_UTILS_WRITING_FILE_CONTENTS": "Writing Client API contents...",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Verify with Montsant

Comment on lines +58 to +59
// TODO: we do not want to show the content of the file
// Therefore, we dont want to show the contents of the caughtError (due to the risk of it sharing unwanted info)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Remove comment before merging PR

Comment on lines +24 to +28
const existingFileContent = await readClientAPIKeyFileContents(this._sdkExecutor);
const clientApiKeyFileContents = ClientApiKeyDTO.Builder
.fromRawString(existingFileContent.data)
.withNewProxyKey(newApiKey)
.build();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like the idea of reading the file a test to know everything works as expected, like a validation to surface potential problems.
In this initial implementation we are trying to just overwrite the value and it doesn't seem right to try to build from previous value. In any case I would like to rethink a little bit about the current ClientApiKeyDTO.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure, we can look into ways of enchancing it and makint it future-proof. What do you suggest?

One thing to keep in mind, specifically about Proxy_Key we agreed that when generating a new key "previous APIs key won't be available" (see ticket). I see little point in storing APIs that cannot be used anymore.

Comment on lines +82 to +85
{
"commandName": "proxy:generatekey",
"supportsInteractiveMode": false,
"generator": "commands/proxy/generatekey/ProxyGenerateKeyCommand"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would prefer to keep alphabetical order on commandName.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changes done. Please verify

*
*/

class ClientApiKeyDTO {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would like to review this class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants