Re: [rt-users] RT::Crypt::GPG with gpg-agent

2016-04-04 Thread Peter Viskup
On Wed, Mar 30, 2016 at 3:06 PM, Jim Brandt  wrote:
>
>
> On 3/30/16 7:52 AM, Peter Viskup wrote:
>>
>> Hello all,
>> just trying to figure how to setup RT with use of gpg-agent.
>>
>> Tried to start gpg-agent this way:
>>
>> root@server:~# gpg-agent --daemon --pinentry-program
>> /usr/bin/pinentry-curses --home /opt/rt4/var/data/GnuPG
>>
>> And then in RT_SiteConfig.pm:
>> Set( %GnuPG,
>>  Enable => 1,
>>  OutgoingMessagesFormat => 'RFC',
>>  AllowEncryptDataInDB => 0
>> );
>>
>> Set( %GnuPGOptions,
>>  'digest-algo'   => 'SHA512',
>>  'use-agent'=> undef,
>>  'gpg-agent-info'=> '/opt/rt4/var/data/GnuPG/.agent-socket',
>>  'no-permission-warning' => undef,
>>  'homedir'   => '/opt/rt4/var/data/GnuPG'
>> );
>>
>> Set( @MailPlugins =>
>>  "Auth::MailFrom",
>>  "Auth::Crypt"
>> );
>>
>> Unfortunately it didn't work.
>>
>> The gpg-agent-info option need to have the values which change with
>> every gpg-agent execution.
>>
>> It could be possible to use write-env-file option and then read the
>> file by RT. Is it possible to extend the RT_SiteConfig.pm that way it
>> will read the file and fill the gpg-agent-info value in GnuPGOptions
>> hash?
>>
>> Any other thoughts?
>>
>> We are running GnuPG version 1.4.12, GnuPG agent version 2.0.19 and
>> latest release of RT 4.2.
>>
>
> I think the use-standard-socket option is another approach. The value is
> then consistent each time. This has become the default in version 2.
> -
> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
> * Washington DC - May 23 & 24, 2016

Thank you - got it working this way:

in rc.local:
# start GPG agent for Request Tracker
/usr/local/bin/rt-gpg-agent

File /usr/local/bin/rt-gpg-agent (possible to extend it to standard
SysVinit script):
#!/bin/sh

RT_GPG_HOME=/opt/rt4/var/data/GnuPG/

[ -f "${RT_GPG_HOME}/S.gpg-agent" ] && rm -f "${RT_GPG_HOME}/S.gpg-agent"

# with cache TTL of 30 days
/usr/bin/gpg-agent --daemon --pinentry-program
/usr/bin/pinentry-curses --home "${RT_GPG_HOME}" --use-standard-socket
--default-cache-ttl 2592000 --max-cache-ttl 2592000

chmod 770 "${RT_GPG_HOME}/S.gpg-agent"
chgrp www-data "${RT_GPG_HOME}/S.gpg-agent"

cp /etc/hosts /tmp
gpg --use-agent --no-permission-warning --home
/opt/rt4/var/data/GnuPG/ -r secur...@eset.sk -e /tmp/hosts
# this will ask gpg-agent for a passphrase and will cache it for RT
gpg --use-agent --no-permission-warning --home
/opt/rt4/var/data/GnuPG/ -r secur...@eset.sk -d /tmp/hosts.gpg
# EOF

Entries for GPG in RT_SiteConfig.pm:
Set( %GnuPG,
Enable => 1,
OutgoingMessagesFormat => 'RFC',
AllowEncryptDataInDB => 0
);

Set( %GnuPGOptions,
'digest-algo'   => 'SHA512',
'use-agent' => undef,
'gpg-agent-info'=> '/opt/rt4/var/data/GnuPG/S.gpg-agent',
'no-permission-warning' => undef,
'homedir'   => '/opt/rt4/var/data/GnuPG'
);

Set( @MailPlugins =>
"Auth::MailFrom",
"Auth::Crypt"
);

Hope it will help somebody.
-- 
Peter
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Easy way to import a CSV file into ticketing?

2016-04-04 Thread Parish, Brent
Agreed – CLI is a good way to go.

I wrote a Perl script to import the database from two other applications and 
that worked reasonably well.
One was a CSV export and the other was a MSSQL database we just connected 
directly to (two different cases that I munged into a single script)

I ran the importer against our test RT environment so I could continue to tweak 
it (and blow it away to start fresh) a number of times before going to prod – I 
highly recommend doing that!

Of note:  Importing into RT will automatically create new ticket numbers for 
the old data.  In our case, it was imperative that I kept the original ticket 
numbers from the one database import, so I ran it first (against an empty RT 
install) and set the ticket number, knowing it wouldn’t overwrite anything in a 
blank RT instance.

I have not looked at or updated the scripts for a long time now, but this may 
be helpful to get you started anyway:
http://parishnetworks.blogspot.com/2014/10/importing-into-rt-from-another-helpdesk.html





From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of 
Eierschmalz, Bernhard
Sent: Monday, April 04, 2016 4:01 AM
To: Dave Florek 
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Easy way to import a CSV file into ticketing?

Hello Dave,

I import many kinds of CSV-files with bash scripts and rt-cli – maybe this 
would be an idea for you!


Mit freundlichen Grüßen,
Best regards,

Bernhard

Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Dave Florek
Gesendet: Donnerstag, 31. März 2016 21:22
An: rt-users@lists.bestpractical.com
Betreff: [rt-users] Easy way to import a CSV file into ticketing?

Good afternoon,

If I have a CSV file full of information that I need to import into RT that's 
not an asset, is there an easy way to do this? I'm looking at the information 
posted in Postgresql for the database, and it looks doable, however I'm not 
sure if I can do it with the UIDs that RT generates.

Any ideas?

Sincerely,
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Alternative GUIs for RT?

2016-04-04 Thread akos . torok
Hi Gary, Vegard, Emmanuel,

We are happy that you find these things interesting. Telling the truth we
wanted to make these functions public, but don't know the proper way.

But now! We are creating one or two plugin of these functions in few weeks
(we are in middle of work, that's why it take so long), and we would upload
it somewhere to you to download.

Vegard, we would be happy if you upload that to github or so, since we are
not git masters. :)

Gary, we have stable version for 3.8., but if we have any useful version
for 4.x, I would ask for our programmers to provide those 4.x code as well,
and I would upload those if there is any.

Hi Emmanuel,
I've just sent you the password, your username is d2. If you have any
questions, just let me know!


Bests,

Ákos





On Fri, Apr 1, 2016 at 8:01 AM, Vegard Vesterheim <
vegard.vesterh...@uninett.no> wrote:

> On Thu, 31 Mar 2016 17:44:55 +0200 akos.to...@docca.hu wrote:
>
> > We don't know if our coding style and quality is okay for RT or not, and
> we
> > are not familiar how to share this plugins on github or so. So we use
> these
> > in house, but we could give you access to our test system, you can try
> it,
> > and if you find useful we could send you the code for 3.8 (and the 4.2 as
> > well but it is not in everyday use).
>
> This looks promising, with funtionality along the same lines that we
> have been contemplating. We would be very interested in having a look at
> the code, and also possibly finding a way to continue
> sharing/co-developing.this further. Please consider putting this on
> Github or a similar hosting service.
>
>  - Vegard V -
>
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Easy way to import a CSV file into ticketing?

2016-04-04 Thread Eierschmalz, Bernhard
Hello Dave,

I import many kinds of CSV-files with bash scripts and rt-cli – maybe this 
would be an idea for you!


Mit freundlichen Grüßen,
Best regards,

Bernhard

Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Dave Florek
Gesendet: Donnerstag, 31. März 2016 21:22
An: rt-users@lists.bestpractical.com
Betreff: [rt-users] Easy way to import a CSV file into ticketing?

Good afternoon,

If I have a CSV file full of information that I need to import into RT that's 
not an asset, is there an easy way to do this? I'm looking at the information 
posted in Postgresql for the database, and it looks doable, however I'm not 
sure if I can do it with the UIDs that RT generates.

Any ideas?

Sincerely,
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016