-
Notifications
You must be signed in to change notification settings - Fork 217
Owls 91448 - Prevent insecure file system warnings by ensuring files are at a minimum of umask 027 and handle Openshift platform. #2533
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
Changes from 7 commits
0d8bd23
8bbd89f
5ebc832
cbd1280
f64e72d
c8d09e4
7c03475
1a16e76
568ac46
357f5a3
d3f49eb
a3e40e9
af03fbe
a36a2bb
913cab2
cc7f026
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -290,12 +290,27 @@ createFolder ${DOMAIN_HOME}/servers/${SERVER_NAME}/security | |
copyIfChanged /weblogic-operator/introspector/boot.properties \ | ||
${DOMAIN_HOME}/servers/${SERVER_NAME}/security/boot.properties | ||
|
||
# remove write and execute permissions for group to prevent insecure file system warnings. | ||
chmod g-wx ${DOMAIN_HOME}/servers/${SERVER_NAME}/security/boot.properties | ||
|
||
|
||
if [ ${DOMAIN_SOURCE_TYPE} != "FromModel" ]; then | ||
trace "Copying situational configuration files from operator cm to ${DOMAIN_HOME}/optconfig directory" | ||
copySitCfgWhileBooting /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig 'Sit-Cfg-CFG--' | ||
copySitCfgWhileBooting /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/jms 'Sit-Cfg-JMS--' | ||
copySitCfgWhileBooting /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/jdbc 'Sit-Cfg-JDBC--' | ||
copySitCfgWhileBooting /weblogic-operator/introspector ${DOMAIN_HOME}/optconfig/diagnostics 'Sit-Cfg-WLDF--' | ||
else | ||
if [[ ${KUBERNETES_PLATFORM^^} == "OPENSHIFT" ]]; then | ||
tbarnes-us marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# Operator running on Openshift platform - change file permissions in the DOMAIN_HOME dir to give | ||
# group same permissions as user . | ||
chmod -R g=u ${DOMAIN_HOME} || return 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also do it for non mii case? Or this is left as an exercise for the user when they create the domain? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I originally suggested that we handle the non-MII cases, but I have a similar concern. In detail: For one, a recursive file traversal of the entire domain-home seems like it could be prohibitively expensive, especially as it's done for every pod cycle. For DII in particular, maybe this can this occur solely when the image is created (and be left up to the customer)? And for DiPV, if we must do something automatic, can it be limited to occur only in the introspector, and, even then, only the first time the introspector sees the domain? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agreed, doing it in the introspector (before zipping up the domain) is a better place. Do we really need -R or is the check only for bin directory? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rjeberhard FYI There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, have we explored doing it in WDT also, it won't solve existing domain or one created with older WDT though? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, one more question. Does the new was check provide any guidance on JKS keystore files? Best practice is user read only. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll set up a meeting to go over this. As per the requirements in JIRA OWLS-91448, we should NOT use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have made the changes to perform the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the image tool is going to handle DII then why does startServer need to? (You wrote "DII case will be handled in image tool " and "I have made the changes to perform ... chmod -R g=u ${DOMAIN_HOME} in startServer.sh script for domain-home-in-image.") There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My comment "DII case will be handled in the image tool" on 9/13 was based on my previous understanding. However, in the standup meeting discussion on Tuesday 9/14, Derek and Robert Patrick suggested to also do |
||
fi | ||
fi | ||
|
||
if [[ ${KUBERNETES_PLATFORM^^} == "OPENSHIFT" ]]; then | ||
# When the Operator is running on Openshift platform, disable insecure file system warnings. | ||
export JAVA_OPTIONS="-Dweblogic.SecureMode.WarnOnInsecureFileSystem=false $JAVA_OPTIONS" | ||
fi | ||
|
||
# | ||
|
Uh oh!
There was an error while loading. Please reload this page.