-
Notifications
You must be signed in to change notification settings - Fork 47
Feat/ip #1245
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
Conversation
Pull Request Test Coverage Report for Build 14740456404Details
💛 - Coveralls |
Please find the ci env pod logs here |
Please find the ci env pod logs here |
Please find the ci env pod logs here |
fence/auth.py
Outdated
@wraps(function) | ||
def decorated_function(*args, **kwargs): | ||
ip_info = get_ip_information_string() | ||
logger.info(ip_info) |
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.
might be a bit difficult to know which IP log corresponds to which API call? does that matter?
Edit: I see the log_ip
decorator is never actually used, and you just call get_ip_information_string
directly in functions you want to log. Did you write it so we can add it to other functions later? or should we remove it?
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.
Yeah I had it b/c there's a potential future where we need to add the log per endpoint and I wanted a consistent way to do that. I can remove it though b/c it's not needed right now
@@ -115,7 +158,7 @@ def set_flask_session_values(user): | |||
# idp info persisted to the database. We return early to avoid | |||
# unnecessarily re-saving that user and idp info. | |||
if user.identity_provider and user.identity_provider.name == provider: | |||
set_flask_session_values(user) | |||
set_flask_session_values_and_log_ip(user) |
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.
do we need to log the IP for failed authentication attempts too?
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.
Good question, I asssumed not. Per security's response in today's architecture meeting 29 APR 2025 we do not need to log IP for non-successful IdP authentication events
fence/blueprints/well_known.py
Outdated
@@ -6,6 +6,7 @@ | |||
|
|||
import flask | |||
|
|||
from fence.auth import log_ip |
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.
do we need this import
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.
nope, from an old test. Removing
Please find the detailed integration test report here Login here Please find the ci env pod logs here |
Please find the detailed integration test report here Login here Please find the ci env pod logs here |
Please find the detailed integration test report here Login here Please find the ci env pod logs here |
Link to JIRA ticket if there is one:
New Features
Breaking Changes
Bug Fixes
Improvements
Dependency updates
Deployment changes