Skip Menu |

This queue is for tickets about the RT-Authen-Token CPAN distribution.

Report information
The Basics
Id: 128478
Status: resolved
Priority: 0/
Queue: RT-Authen-Token

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: First time trying to use Authen Token
Date: Mon, 11 Feb 2019 14:20:25 -0600
To: bug-RT-Authen-Token [...] rt.cpan.org
From: Joseph Cooper <anon [...] example.com>
New setup of RT4.4.3 on a RHEL7.6 server. I enabled the plugin, edited apache per the instructions, cleared the mason cache, and restarted httpd. When I try to generate a token I get these in my debug log [image: image.png] [104710] [Mon Feb 11 20:16:12 2019] [warning]: RT::Handle=HASH(0xa673680) couldn't execute the query 'SELECT count(main.id) FROM RTxAuthTokens main WHERE (main.Owner = '199088') ' at /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 599. DBIx::SearchBuilder::Handle::SimpleQuery('RT::Handle=HASH(0xa673680)', 'SELECT count(main.id) FROM RTxAuthTokens main WHERE (main.Ow...') called at /usr/local/share/perl5/DBIx/SearchBuilder.pm line 297 DBIx::SearchBuilder::_DoCount('RT::AuthTokens=HASH(0xa7aea40)') called at /opt/rt4/sbin/../lib/RT/SearchBuilder.pm line 993 RT::SearchBuilder::_DoCount('RT::AuthTokens=HASH(0xa7aea40)') called at /usr/local/share/perl5/DBIx/SearchBuilder.pm line 1479 DBIx::SearchBuilder::Count('RT::AuthTokens=HASH(0xa7aea40)') called at /opt/rt4/local/plugins/RT-Authen-Token/html/Elements/AuthToken/List line 11 HTML::Mason::Commands::__ANON__('Owner', 199088) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 135 HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa7aec08)', 'Owner', 199088) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1302 eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1292 HTML::Mason::Request::comp(undef, undef, 'Owner', 199088) called at /opt/rt4/local/plugins/RT-Authen-Token/html/Helpers/AuthToken/List line 1 HTML::Mason::Commands::__ANON__('owner', 199088) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 135 HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa6754b8)', 'owner', 199088) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1302 eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1292 HTML::Mason::Request::comp(undef, undef, undef, 'owner', 199088) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 955 HTML::Mason::Request::call_next('RT::Interface::Web::Request=HASH(0xa1245f0)') called at /opt/rt4/share/html/Helpers/autohandler line 51 HTML::Mason::Commands::__ANON__('owner', 199088) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 135 HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa688f38)', 'owner', 199088) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1302 eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1292 HTML::Mason::Request::comp(undef, undef, undef, 'owner', 199088) called at /opt/rt4/sbin/../lib/RT/Interface/Web.pm line 697 RT::Interface::Web::ShowRequestedPage('HASH(0xa6d81a0)') called at /opt/rt4/sbin/../lib/RT/Interface/Web.pm line 376 RT::Interface::Web::HandleRequest('HASH(0xa6d81a0)') called at /opt/rt4/share/html/autohandler line 53 HTML::Mason::Commands::__ANON__('owner', 199088) called at /usr/local/share/perl5/HTML/Mason/Component.pm line 135 HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xa689400)', 'owner', 199088) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1297 eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 1292 HTML::Mason::Request::comp(undef, undef, undef, 'owner', 199088) called at /usr/local/share/perl5/HTML/Mason/Request.pm line 481 eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 481 eval {...} called at /usr/local/share/perl5/HTML/Mason/Request.pm line 433 HTML::Mason::Request::exec('RT::Interface::Web::Request=HASH(0xa1245f0)') called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 96 eval {...} called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 96 HTML::Mason::Request::PSGI::exec('RT::Interface::Web::Request=HASH(0xa1245f0)') called at /usr/local/share/perl5/HTML/Mason/Interp.pm line 342 HTML::Mason::Interp::exec(undef, undef, 'owner', 199088) called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 59 eval {...} called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 59 HTML::Mason::PSGIHandler::invoke_mason('HTML::Mason::PSGIHandler::Streamy=HASH(0xa123e70)', 'HASH(0xa67d610)', 'HASH(0xa67cd28)') called at /usr/local/share/perl5/HTML/Mason/PSGIHandler/Streamy.pm line 52 HTML::Mason::PSGIHandler::Streamy::__ANON__('CODE(0xa5f9d60)') called at /usr/local/share/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__('CODE(0xa5de880)') called at /usr/local/share/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__('CODE(0xa673368)') called at /usr/local/share/perl5/Plack/Handler/FCGI.pm line 149 Plack::Handler::FCGI::run('Plack::Handler::FCGI=HASH(0xa14c5e0)', 'CODE(0xa17aaa8)') called at /usr/local/share/perl5/Plack/Loader.pm line 84 Plack::Loader::run('Plack::Loader=HASH(0xa163b40)', 'Plack::Handler::FCGI=HASH(0xa14c5e0)') called at /usr/local/share/perl5/Plack/Runner.pm line 277 Plack::Runner::run('RT::PlackRunner=HASH(0x2f26f40)') called at /opt/rt4/sbin/../lib/RT/PlackRunner.pm line 150 eval {...} called at /opt/rt4/sbin/../lib/RT/PlackRunner.pm line 150 RT::PlackRunner::run('RT::PlackRunner=HASH(0x2f26f40)') called at /opt/rt4/sbin/rt-server.fcgi line 162 (/usr/share/perl5/vendor_perl/Carp.pm:103) [104710] [Mon Feb 11 20:16:12 2019] [warning]: Use of uninitialized value in numeric eq (==) at /opt/rt4/local/plugins/RT-Authen-Token/html/Elements/AuthToken/List line 11. (/opt/rt4/local/plugins/RT-Authen-Token/html/Elements/AuthToken/List:11) Joseph Cooper Sr. SOC Analyst - Information Security Fossil Group 901 S. Central Expwy. Richardson TX 75080 United States www.fossilgroup.com O: e: anon@example.com
Download image.png
image/png 15.4k
image.png
On Mon Feb 11 15:21:14 2019, anon@example.com wrote: Show quoted text
> New setup of RT4.4.3 on a RHEL7.6 server. > I enabled the plugin, edited apache per the instructions, cleared the > mason > cache, and restarted httpd. When I try to generate a token I get these > in > my debug log
Hi Joseph, As part of the installation, did you also run the 'make initdb' step to create the new token table?
Subject: Re: [rt.cpan.org #128478] First time trying to use Authen Token
Date: Mon, 11 Feb 2019 15:03:43 -0600
To: bug-RT-Authen-Token [...] rt.cpan.org
From: Joseph Cooper <anon [...] example.com>
I used cpan to install it. How would I use the "make initdb" at this point? Joseph Cooper Sr. SOC Analyst - Information Security Fossil Group 901 S. Central Expwy. Richardson TX 75080 United States www.fossilgroup.com O: e: anon@example.com On Mon, Feb 11, 2019 at 2:49 PM Best Practical Solutions »|« via RT < bug-RT-Authen-Token@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=128478 > > > On Mon Feb 11 15:21:14 2019, anon@example.com wrote:
> > New setup of RT4.4.3 on a RHEL7.6 server. > > I enabled the plugin, edited apache per the instructions, cleared the > > mason > > cache, and restarted httpd. When I try to generate a token I get these > > in > > my debug log
> > Hi Joseph, > > As part of the installation, did you also run the 'make initdb' step to > create the new token table? > >
On Mon Feb 11 16:04:27 2019, anon@example.com wrote: Show quoted text
> I used cpan to install it. How would I use the "make initdb" at this point?
From your /opt/rt4 directory, you can try running: $ sbin/rt-setup-database --action schema --datafile local/plugins/RT-Authen-Token/etc/schema.mysql You can pick a different schema file if you are running with a different DB.
Subject: Re: [rt.cpan.org #128478] First time trying to use Authen Token
Date: Mon, 11 Feb 2019 15:17:18 -0600
To: bug-RT-Authen-Token [...] rt.cpan.org
From: Joseph Cooper <anon [...] example.com>
I ran this since it is PostGres # sbin/rt-setup-database --action schema --datafile local/plugins/RT-Authen-Token/etc/schema.Pg ExternalAuth at /opt/rt4/etc/RT_SiteConfig.d/ldap.pm line 2. In order to create or update your RT database, this script needs to connect to your Pg instance on localhost (port '') as postgres Please specify that user's database password below. If the user has no database password, just press return. Password: Working with: Type: Pg Host: localhost Port: Name: rt4 User: rt_user DBA: postgres Now populating database schema. Done. I cleared the mason_obj cache just in case and restarted httpd. I still get this when I generate a token. [image: image.png] Joseph Cooper Sr. SOC Analyst - Information Security Fossil Group 901 S. Central Expwy. Richardson TX 75080 United States www.fossilgroup.com O: e: anon@example.com On Mon, Feb 11, 2019 at 3:11 PM Best Practical Solutions »|« via RT < bug-RT-Authen-Token@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=128478 > > > On Mon Feb 11 16:04:27 2019, anon@example.com wrote:
> > I used cpan to install it. How would I use the "make initdb" at this
> point? > > From your /opt/rt4 directory, you can try running: > > $ sbin/rt-setup-database --action schema --datafile > local/plugins/RT-Authen-Token/etc/schema.mysql > > You can pick a different schema file if you are running with a different > DB. > >
Download image.png
image/png 9.2k
image.png
Show quoted text
> I cleared the mason_obj cache just in case and restarted httpd. I still get > this when I generate a token.
OK, Pg needs ACLs too: sbin/rt-setup-database --action acl --datafile local/plugins/RT-Authen-Token/etc/acl.Pg
Subject: Re: [rt.cpan.org #128478] First time trying to use Authen Token
Date: Mon, 11 Feb 2019 15:33:24 -0600
To: bug-RT-Authen-Token [...] rt.cpan.org
From: Joseph Cooper <anon [...] example.com>
That did it! Thanks. Can I use this to auth with REST 1.0? I'd use 2.0, but it doesn't allow me to pull custom fields Joseph Cooper Sr. SOC Analyst - Information Security Fossil Group 901 S. Central Expwy. Richardson TX 75080 United States www.fossilgroup.com O: e: anon@example.com On Mon, Feb 11, 2019 at 3:27 PM Best Practical Solutions »|« via RT < bug-RT-Authen-Token@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=128478 > > >
> > I cleared the mason_obj cache just in case and restarted httpd. I still
> get
> > this when I generate a token.
> > OK, Pg needs ACLs too: > > sbin/rt-setup-database --action acl --datafile > local/plugins/RT-Authen-Token/etc/acl.Pg > >
On Mon Feb 11 16:34:14 2019, anon@example.com wrote: Show quoted text
> That did it! Thanks. > Can I use this to auth with REST 1.0? I'd use 2.0, but it doesn't allow me to pull custom fields
No, the Authen::Token extension doesn't work with REST 1. However, you can get custom field information from REST 2. When you fetch a ticket, if there are custom fields defined, you should see a "CustomFields" entry in the response JSON with the current values.