-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
Caracal/handlers/authHandlers.js
Lines 23 to 29 in 91fec6d
| if (!fs.existsSync('./keys/key') && !fs.existsSync('./keys/key.pub') && GENERATE_KEY_IF_MISSING) { | |
| try { | |
| execSync(`${preCommand}'/CN=www.camicroscope.com/O=caMicroscope Local Instance Key./C=US'${postCommand}`); | |
| } catch (err) { | |
| console.log({err: err}); | |
| } | |
| } |
I had the following queries about the following lines.
- is the sole purpose of these lines is to create the keys programmatically at runtime? afaik this should be done in the docker-compose step and not during runtime?
- If the above is false (i.e. these have separate responsibilities), then the keys should be generated when either of the file is missing right? The code will execute only if both of the files are missing.
- also, is there any particular reason for dividing the string into three segments, pre, mid and post?
Metadata
Metadata
Assignees
Labels
No labels