Open drothery-edb opened 1 year ago
Question: is using sudo in commands requiring a root user a viable option? If we think so, we could include that as another possible MVP approach.
Let's start by gathering some examples across different products where commands need to be run as a specific user. Ex:
postgres
barman
With these examples, we can experiment with different options to see what strateg(ies) work well across the board.
Here is a link with some examples in the existing content.
Waiting on customer feedback on example!
Here is our prototype: https://github.com/EnterpriseDB/docs/pull/3733
Add more examples from Index Advisor topic (https://www.enterprisedb.com/docs/epas/latest/epas_guide/03_database_administration/02_index_advisor/02_index_advisor_configuration/) , write up guidelines, socialize with team
TODOs:
enterprisedb
)At some point @djw-m and @nidhibhammar are going to sync up on this...
1) Policy first: We should never tell users to log in as root, or raise privileges unecessarily. Always use sudo to execute single commands with privilege. 2) Use sudo for alternate user identities 3) No need to delineate that a privilege is being taken - the sudo command does that inline for us 4) Danger comes in many forms and we should select an admonition (Warning/Danger?) for dangerous activities in general, not just root/privilege issues. Also best not to say Danger. "Be Aware"?
Searching for user/superuser is probably going to give a lot of false positives.
Suggest searching for "root" and "su -" for any privilege changes.
PEM Agent can be registered using sudo: https://www.enterprisedb.com/docs/pem/latest/registering_agent/#examples
Summary
We received this feedback from a federal customer shared by the CSM, Georgia Nicolaides:
We do have one topic where we used a new parameter for a code block (promptUser) to indicate when a command required root. See https://www.enterprisedb.com/docs/pem/latest/registering_agent/#examples. For the examples that did not require root, we added dollar signs to represent a regular user prompt. Here are some options for a more holistic approach when user clarification is not handled in the content itself or by other methods (for example, using sudo for install commands):
If we decide to use an indicator when root is not required:
Probably the best user experience would be 2, 3.i, 4.i. This might be overkill though and comes at a very high cost.
Two MVP approaches we could run by the customer are: