-
Notifications
You must be signed in to change notification settings - Fork 51
[Discuss] Create Nexmo Application config file upon app creation #109
Comments
There is already an option to write the private key to a file on app creation, I'm not sure how much benefit there is to writing the app id as its easy enough to get it in the list from Is the public key used for anything by the developer? I hadn't even noticed it TBH! |
I think this should be one file or a directory as I wouldn't particularly like to add three files to the root of my project. Furthermore this would mean one exclusion would need adding to a There might even be potential for storing the certificates in the the keychain. Secondly I personally would prefer prefixing any such file with |
Yes, there is. But if you forget to save it that time then it's lost. Part of my suggestion is that this is always saved and that you have to opt-out rather than opt-in.
I've had the problem where I've not stored the application ID a number of times. Finding it again has been a bit of a hassle and in a lot of cases I've ended up just creating a new application instead. Again, I'd say it's something that should always be saved.
I don't believe it is used at present.
Good point.
Are
Do we then assume the user is on a specific runtime?
We should go with a well established convention. What does other similar tooling do? Can we provide some good examples to feed into the decision? |
No they are not, it's still handy as convention this is used to identify it as a configuration file and groups such files together (since they are alphabetically together) in a list of files such as when using
I mean the system keychain. Supported on Linux & MacOS, I'm unsure if Windows has an equivalent.
Here are some examples:
|
Excellent discussion. FYI currently your API credentials are stored in Anyway, I think we should focus less on the implementation, and more on the use cases here. What are we trying to achieve? I agree that currently the CLI is very verbose, and constantly requires me to provide app IDs, which are not very easy to use. It would be great to "switch" the CLI to a certain app. We can either do this globally: nexmo switch app_name Or we can do what Heroku does and try and determine some context on a per project basis. I would not want my keys to be stored in my project, but I probably do want to store in my project what Nexmo app is attached to this project. Again, let's focus on use cases, then the implementation will arise from it. |
I don't think it should be a . prefix, most systems 'hide' these files from general view when you list for example |
I'm concerned about having this as the default and creating files containing security credentials automatically potentially anywhere on the system. |
What should happen if there is an existing file named |
I agree with most what's being said here. Let's focus on the real usecase here though, and not solutions. Often solutions are simple once you properly understand the usecase. So, what is the main user story we can come up with? This is my attempt: Use case:
I feel this is a pretty simple use case but probably also the only one? Did I miss one? To achieve this we need:
Did I miss anything? |
The app ID and private Key for a given app are not needed by the CLI itself to manage application level config that is still currently all done with APIKEY and SECRET although may well move to its own JWT/Private key in the future. This is more about the CLI generating you a 'config file' for your application automagically rather than just outputting the values to the terminal for you to use as you want. |
@sammachin thanks for clarifying. So @leggetter what really is the use case? Can you help describe it a bit more structured? |
The main motivation behind the potential need for a configuration file is that the
application_id
should always be saved somewhere upon application creation. There are other values that are returned fromPOST /applications
that should also probably be stored by default and I believe we should consider making the Nexmo CLI do this by default.As an initial suggestion:
id
andkeys
values anexmo_app.json
config fileprivate_key
to anexmo_private.key
and make the value ofprivate_key
in the config the name of the saved file.public_key
to anexmo_public.key
and make the value ofpublic_key
in the config.name
,voice
(which should really be an application type) as these values can change and the config will get out of sync.Note: is there a better naming convention for public and private keys whilst still making it clear these are Nexmo app key files?
The text was updated successfully, but these errors were encountered: