| Summary: | Last login,Last login IP fields empty. | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] CloudForms Cloud Engine | Reporter: | Aziza Karol <akarol> | ||||||||||
| Component: | aeolus-conductor | Assignee: | chris alfonso <calfonso> | ||||||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | wes hayutin <whayutin> | ||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||
| Priority: | unspecified | ||||||||||||
| Version: | 1.0.0 | CC: | akarol, calfonso, dajohnso, deltacloud-maint, dgao, hbrock, slinaber, ssachdev | ||||||||||
| Target Milestone: | rc | ||||||||||||
| Target Release: | --- | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Whiteboard: | |||||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
| Doc Text: | Story Points: | --- | |||||||||||
| Clone Of: | Environment: | ||||||||||||
| Last Closed: | Type: | --- | |||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||
| Documentation: | --- | CRM: | |||||||||||
| Verified Versions: | Category: | --- | |||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
| Attachments: |
|
||||||||||||
|
Description
Aziza Karol
2011-11-22 13:06:56 UTC
Created attachment 535017 [details]
user details
Created attachment 542036 [details]
ss
Looks closer but still not showing the correct IP, see the screenshot. Also saw a value of ::1
aeolus-all-0.7.0-4.el6.noarch
aeolus-conductor-0.7.0-4.el6.noarch
aeolus-conductor-daemons-0.7.0-4.el6.noarch
aeolus-conductor-doc-0.7.0-4.el6.noarch
aeolus-configure-2.4.0-3.el6.noarch
rubygem-aeolus-cli-0.2.0-3.el6.noarch
rubygem-aeolus-image-0.2.0-1.el6.noarch
Hmm, just checked the history and I really need to use today's build to verify this, disregard comment 2 at this point. Checked this mornings build and am seeing the same results of comment 2. I am expecting the IP and/or DNS name of my workstation accessing the web ui. aeolus-all-0.7.0-4.el6.noarch aeolus-conductor-0.7.0-4.el6.noarch aeolus-conductor-daemons-0.7.0-4.el6.noarch aeolus-conductor-doc-0.7.0-4.el6.noarch aeolus-configure-2.4.0-3.el6.noarch rubygem-aeolus-cli-0.2.0-3.el6.noarch rubygem-aeolus-image-0.2.0-1.el6.noarch *** Bug 761353 has been marked as a duplicate of this bug. *** Is this on a RHEVM based client? posted a patch to conductor for review.
[main] 0fef636b94b12d860f9ce9f354e15fa2a8e307ca - commit 1 of 2235 (0%)
commit 0fef636b94b12d860f9ce9f354e15fa2a8e307ca
Refs: master, v0.6.0_RC_1-188-g0fef636
Author: Chris Alfonso <calfonso>
AuthorDate: Tue Dec 20 12:51:10 2011 -0500
Commit: Chris Alfonso <calfonso>
CommitDate: Tue Dec 20 12:51:10 2011 -0500
BZ#755933 Last login,Last login IP fields empty.
The implementation of rails' AbstractRequest.remote_ip returns the HTTP_CLIENT_IP
if it's populated, which when there is a a proxy (apache) in front of rails, the
client ip is 127.0.0.1. I would think rails should check the HTTP_X_FORWARDED_FOR
first, then fall back to the HTTP_CLIENT_IP. For now, I've added a check for the
HTTP_X_FORWARDED_FOR first, then fall back to the remote_ip method call.
---
src/config/initializers/warden.rb | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/config/initializers/warden.rb b/src/config/initializers/warden.rb
index de391a5..2298b97 100644
--- a/src/config/initializers/warden.rb
+++ b/src/config/initializers/warden.rb
@@ -63,7 +63,8 @@ Warden::Strategies.add(:database) do
login, password = get_credentials
return unless login && password
Rails.logger.debug("Warden is authenticating #{login} against database")
- u = User.authenticate(login, password, request.remote_ip)
+ ipaddress = request.env[ 'HTTP_X_FORWARDED_FOR' ] ? request.env[ 'HTTP_X_FORWARDED_FOR' ] : request.remote_ip
+ u = User.authenticate(login, password, ipaddress)
u ? success!(u) : fail!("Username or password is not correct - could not log in")
end
end
pushed to conductor repository: commit a627c7457caafb8c46f2dec9f108edb7fa1cfb58 Created attachment 551794 [details]
last_login_IP
rpm -qa|grep aeolus aeolus-configure-2.6.0-0.20120105171403gitf0043e8.el6.noarch aeolus-conductor-doc-0.9.0-0.20120105223209git5e068fe.el6.noarch rubygem-arel-2.0.10-0.aeolus.el6.noarch rubygem-rack-mount-0.7.1-3.aeolus.el6.noarch rubygem-ZenTest-4.3.3-2.aeolus.el6.noarch rubygem-aeolus-image-0.4.0-0.20120105171419git8108b42.el6.noarch aeolus-conductor-0.9.0-0.20120105223209git5e068fe.el6.noarch aeolus-all-0.9.0-0.20120105223209git5e068fe.el6.noarch rubygem-aeolus-cli-0.4.0-0.20120105171410git2c6b457.el6.noarch aeolus-conductor-daemons-0.9.0-0.20120105223209git5e068fe.el6.noarch a627c7457caafb8c46f2dec9f108edb7fa1cfb58 in aeolus-conductor-0.8.0-2.el6.src.rpm Values displayed in Last login,Last login IP fields. see attached screenshot. verified in: [root@dell-pe1950-02 ~]# rpm -qa | grep aeolus aeolus-configure-2.5.0-4.el6.noarch rubygem-aeolus-cli-0.3.0-3.el6.noarch aeolus-conductor-doc-0.8.0-5.el6.noarch aeolus-all-0.8.0-5.el6.noarch aeolus-conductor-daemons-0.8.0-5.el6.noarch rubygem-aeolus-image-0.3.0-2.el6.noarch aeolus-conductor-0.8.0-5.el6.noarch Created attachment 552310 [details]
login ip
bugs in verified or on_qa moving off tracker |