-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed DO group permissions to allow for writing the connection string #61
Fixed DO group permissions to allow for writing the connection string #61
Conversation
packages/debian/postinst
Outdated
# Restart deliveryoptimization-agent service to ensure that the new 'do' user's permissions take effect. | ||
echo "Restart $ms_doclient_lite_service" | ||
systemctl restart "$ms_doclient_lite_service" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you combine the 2 blocks and restart do-agent only once please?
(Or, just set a boolean, and only restart do-agent is needed) #Pending
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
packages/debian/postinst
Outdated
# Restart deliveryoptimization-agent service to ensure that the new 'do' user's permissions take effect. | ||
echo "Restart $ms_doclient_lite_service" | ||
systemctl restart "$ms_doclient_lite_service" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if someone builds a client that doesn't use DO? Do they not use / modify this postinst file? Is this documented?
Can we call another script from postinst and move do related stuff there? #Pending
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're tying DO configuration into this postinst file, which might be okay if this is all just for our reference package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our postinst script is expressly for our debian package which already lists DO as a dependency. You cannot install our package produced by our scripts without the DO dependency.
If we moved to the model you're suggesting we would have to remove that DO dependency which I don't think makes sense.
To me it is fine that we keep it here as long as we are building our package based agent to run as such. If we want to make our package downloader configurable I think we would have to change a large amount of the setup.
In fact the way these are written if DO wasn't installed it would still pass we just wouldn't setup the relationships posted here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not thrilled with this whole comment:
# Note: DO user and group are created by deliveryoptimization-agent Debian package,
# which is one of the dependencies declared in adu-agent control file.
# We are assuming that both DO user and group currently exist at this point.
seems hacky to me. Not blocking, but consider tracking for future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
@@ -143,9 +143,11 @@ case "$1" in | |||
# which is one of the dependencies declared in adu-agent control file. | |||
# We are assuming that both DO user and group currently exist at this point. | |||
# Add 'do' user to 'adu' group to allow DO to write to ADU download sandbox. | |||
echo "Add the 'do' user to the 'adu' group." | |||
echo "Add the 'do' user to the 'adu' group and 'adu' to the 'do' group" | |||
if getent passwd 'do' > /dev/null; then | |||
usermod -aG 'adu' 'do' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if getent passwd 'do' > /dev/null; then | ||
usermod -aG 'adu' 'do' | ||
# Note: We must add the 'adu' user to the 'do' group so that we can set the connection_string for DO | ||
usermod -aG 'do' 'adu' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved with comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the code in our postisnt script to add adu to the do group so we have permissions to write the connection_string to DO in order to fix an issue with the Nested Edge scenario.