Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #907 from castrapel/log_ssl_alt_name
Browse files Browse the repository at this point in the history
Log ssl alt name errors
  • Loading branch information
castrapel committed Jan 15, 2018
2 parents 1ddf878 + 83cfbcf commit 937ad29
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions env-config/config-docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,6 @@ def env_to_bool(input):
REMEMBER_COOKIE_DURATION=timedelta(minutes=60) # Can make longer if you want remember_me to be useful.
REMEMBER_COOKIE_SECURE=True
REMEMBER_COOKIE_HTTPONLY=True

# Log SSL Cert SubjectAltName errors
LOG_SSL_SUBJ_ALT_NAME_ERRORS = True
5 changes: 4 additions & 1 deletion env-config/config-local.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,7 @@
# Public x509 certificate of the IdP
"x509cert": "<ONELOGIN_APP_CERT>"
}
}
}

# Log SSL Cert SubjectAltName errors
LOG_SSL_SUBJ_ALT_NAME_ERRORS = True
3 changes: 3 additions & 0 deletions env-config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
SECURITY_POST_RESET_VIEW = BASE_URL
SECURITY_POST_CHANGE_VIEW = BASE_URL

# Log SSL Cert SubjectAltName errors
LOG_SSL_SUBJ_ALT_NAME_ERRORS = True

# This address gets all change notifications (i.e. 'securityteam@example.com')
SECURITY_TEAM_EMAIL = []

Expand Down
3 changes: 3 additions & 0 deletions scripts/secmonkey_auto_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,9 @@ REMEMBER_COOKIE_DURATION=timedelta(minutes=60) # Can make longer if you want re
REMEMBER_COOKIE_SECURE=True
REMEMBER_COOKIE_HTTPONLY=True
# Log SSL Cert SubjectAltName errors
LOG_SSL_SUBJ_ALT_NAME_ERRORS = True
EOF

}
Expand Down
3 changes: 2 additions & 1 deletion security_monkey/watchers/iam/iam_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def cert_get_domains(cert):
for entry in entries:
domains.append(entry)
except Exception as e:
app.logger.warning("Failed to get SubjectAltName: {0}".format(e))
if app.config.get("LOG_SSL_SUBJ_ALT_NAME_ERRORS", True):
app.logger.warning("Failed to get SubjectAltName: {0}".format(e), exc_info=True)

return domains

Expand Down

0 comments on commit 937ad29

Please sign in to comment.