eve-seat / seat

SeAT 0x. [UNSUPPORTED]
https://github.com/eveseat/seat
MIT License
69 stars 37 forks source link

Include a better User-Agent PhealNG #429

Closed regner closed 8 years ago

regner commented 8 years ago

Most (over 60%) of the SEAT installs out there seem to have the stock contact information for the user agent of "seatadmin@localhost.local". Can you better encourage people to update this information? There are a few instances of SEAT doing some weird things and I would like to poke people. :)

MilosRasic commented 8 years ago

Oh, boi, this is like police knocking on your door :)

This might be a slight problem for people running custom versions like myself. Based on an old version of SeAT, mine seems to override phealng's http_user_agent setting in app/eveapi/BaseAPI.php with: PhealConfig::getInstance()->http_user_agent = 'SeAT ' . \Config::get('seat.version') . 'API Fetcher';

This should have been generating 'SeAT unknown API Fetcher' user agent string from my instance of SeAT. Changed to include a contact email now. Hopefully this is the correct place where user agent is set. Can't find it anywhere else.

regner commented 8 years ago

The top 60% of user agents for SeAT specifically have the seatadmin@localhost.local in the header. So I assume this most instances are on at least those versions. 50% of the SeAT requests come from 2 versions with that default header.

eve-seat commented 8 years ago

@Regner thanks for this heads up. Could you paste the full user agent you are getting?

I think 2 major things are at play here.

As far as the user agent specification goes, I think the best would then be for us to add a hard requirement to set the email address as part of the installation procedure in 1.x which is easy enough to do.

@MilosRasic the user agent is actually defined in this whole block taking the mail settings into account to set a technical contact and falling back to the actual mail from in the mail settings file / environment.

Happy to discuss this further to get to a workable solution!

regner commented 8 years ago

Splunk search for the past 24 hours: index=api UserAgent = "PhealNG/*+eveseat/*" | top userAgent

Results:

    userAgent                                                count   percent
    PhealNG/2.3.4+eveseat/1.0.11+seatadmin@localhost.local   2310817 33.207582
    PhealNG/2.3.4+eveseat/1.0.12+seatadmin@localhost.local   1628843 23.407279
    PhealNG/2.3.4+eveseat/1.0.8+seatadmin@localhost.local     363219  5.219636
    PhealNG/2.3.4+eveseat/1.0.10+****@****.com                361250  5.191341
    PhealNG/2.3.4+eveseat/1.0.12+****@****.com                319359  4.589347
    PhealNG/2.3.4+eveseat/1.0.11+****@****.com                289840  4.165144
    PhealNG/2.3.4+eveseat/1.0.11+****@****.com                201905  2.901475
    PhealNG/2.3.4+eveseat/1.0.12+****@****.com                159709  2.295097
    PhealNG/2.3.4+eveseat/1.0.12+****@****.com                154763  2.224021
    PhealNG/2.3.4+eveseat/1.0.12+****@****.com                134392  1.931279
MilosRasic commented 8 years ago

idgi, does Pheal further compile something like 'SeAT 1.0.11 API Fetcher at localhost.local Install mail_from seatadmin@localhost.local Administrative Contact: seatadmin@localhost.local' to something like 'PhealNG/2.3.4+eveseat/1.0.11+seatadmin@localhost.local' ?

eve-seat commented 8 years ago

@Regner fantastic. This is from the 1.x repository which solves a lot of problems! I added eveseat/seat#77 to track this implementation.

eve-seat commented 8 years ago

Before I forget, @Regner would it be possible to tell us what oddities you are seeing from SeAT in eveseat/seat#77 too?

Thanks again.

eve-seat commented 8 years ago

Closing this to be tracked in the 1.x codebase.

regner commented 8 years ago

Sorry about that. I didn't realize you had a completely different repo for 1.x. :) Thank you very much for taking action on this, I really do appreciate it. :D