pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedAuthentication trick
9+ messages / 4 participants
[nested] [flat]
* Authentication trick
@ 2006-11-30 18:10 antongiulio05@gmail.com <antongiulio05@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: antongiulio05@gmail.com @ 2006-11-30 18:10 UTC (permalink / raw)
To: pgsql-jdbc
Hi,
some commercial softwares use a trick to avoid copy of a db, license-crack, etc. They use generate a key -> "ID of db-instance". For example, if you dump a db on other machine with postgres installed, this key will be different and so application will not start.
It was good for Oracle, DB2 and MS-SQL. Is there a "similar key" for Postgres? Is it possible retrieve it via-jdbc? How?
Thanks,
Giulio
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Authentication trick
@ 2006-12-01 09:31 Heikki Linnakangas <heikki@enterprisedb.com>
parent: antongiulio05@gmail.com <antongiulio05@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Heikki Linnakangas @ 2006-12-01 09:31 UTC (permalink / raw)
To: antongiulio05@gmail.com; +Cc: pgsql-jdbc
antongiulio05@gmail.com wrote:
> Hi,
>
> some commercial softwares use a trick to avoid copy of a db, license-crack, etc. They use generate a key -> "ID of db-instance". For example, if you dump a db on other machine with postgres installed, this key will be different and so application will not start.
PostgreSQL is not commercial, so there's no need for such artificial
restrictions. There is, however, a unique system_identifier in
pg_control file that's generated when initdb is run. It's used on WAL
replay to check that the WAL logs were generated by the same installation.
> It was good for Oracle, DB2 and MS-SQL. Is there a "similar key" for Postgres? Is it possible retrieve it via-jdbc? How?
There's no way to retrieve system_identifier from the client.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Authentication trick
@ 2006-12-01 10:47 Heikki Linnakangas <heikki@enterprisedb.com>
parent: antongiulio05@gmail.com <antongiulio05@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Heikki Linnakangas @ 2006-12-01 10:47 UTC (permalink / raw)
To: antongiulio05@gmail.com; +Cc: pgsql-jdbc
antongiulio05@gmail.com wrote:
> My application is commercial. It uses postgresql. I want include in my-app a "protection-trick" retrieving a some kind of "unique system_identifier". Your pg_control file could be good, but it's a "data-file". How can I extract infos from it?
Sounds like a bad idea. system_identifier changes when you dump/restore
to another installation. You don't want to forbid your users to restore
from a backup, do you?
> Around same dir I have found these infos:
>
> "myappdb" 20496 1663 3221455155 229682
>
> Maybe are these the keys?
pg_database? No, don't mess with that. And those numbers are not
guaranteed to be unique across installations.
I'd recommend trusting your users instead of adding limitations like
that. They can be a real pain the ass if you're user wants to move his
database to another server, run a warm-standby, backup/restore, run in a
virtualized environment etc. and you don't want to cause hardship like
that to your customers, do you?
If you still want to add a server key etc, I'd suggest creating user
defined function that extracts a system identifier from somewhere else
than the database.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Authentication trick
@ 2006-12-01 10:57 antongiulio05@gmail.com <antongiulio05@gmail.com>
parent: Heikki Linnakangas <heikki@enterprisedb.com>
0 siblings, 1 reply; 9+ messages in thread
From: antongiulio05@gmail.com @ 2006-12-01 10:57 UTC (permalink / raw)
To: Heikki Linnakangas <heikki@enterprisedb.com>; +Cc: pgsql-jdbc
> > some commercial softwares use a trick to avoid copy of a db, license-crack, etc. They use generate a key -> "ID of db-instance". For example, if you dump a db on other machine with postgres installed, this key will be different and so application will not start.
>
> PostgreSQL is not commercial, so there's no need for such artificial
> restrictions.
My application is commercial. It uses postgresql. I want include in my-app a "protection-trick" retrieving a some kind of "unique system_identifier". Your pg_control file could be good, but it's a "data-file". How can I extract infos from it?
Around same dir I have found these infos:
"myappdb" 20496 1663 3221455155 229682
Maybe are these the keys?
Thanks,
Giulio
P.S.: sorry, now post became OT for "jdbc".
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Authentication trick
@ 2006-12-01 12:14 antongiulio05@gmail.com <antongiulio05@gmail.com>
parent: Heikki Linnakangas <heikki@enterprisedb.com>
0 siblings, 2 replies; 9+ messages in thread
From: antongiulio05@gmail.com @ 2006-12-01 12:14 UTC (permalink / raw)
To: Heikki Linnakangas <heikki@enterprisedb.com>; +Cc: pgsql-jdbc
Hi Heikki
> You don't want to forbid your users to restore from a backup, do you?
Yes I want! This is a (painful) trick:)
I want to avoid not authorized dump/restore in other machines (a single customer pays for remote upgrading of his db-infos).
If you want dump/restore backup you will contact me - I'll enable new user-authentication based on new "unique-key-from-db" but will disable old key. You pay for one db not 2,3,..... one db:one license
Obviously this is a real pain the ass for restore (but we are thinking to authomatize it with: unlock-new-key/lock-old-key).
Problem now is how to retrieve this unique-key:)
> I'd recommend trusting your users instead of adding limitations like
> that. They can be a real pain the ass if you're user wants to move his
> database to another server, run a warm-standby, backup/restore, run in a
> virtualized environment etc. and you don't want to cause hardship like
> that to your customers, do you?
>
> If you still want to add a server key etc, I'd suggest creating user
> defined function that extracts a system identifier from somewhere else
> than the database.
Thanks,
Giulio
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Authentication trick
@ 2006-12-01 13:43 Jan de Visser <jdevisser@digitalfairway.com>
parent: antongiulio05@gmail.com <antongiulio05@gmail.com>
1 sibling, 1 reply; 9+ messages in thread
From: Jan de Visser @ 2006-12-01 13:43 UTC (permalink / raw)
To: pgsql-jdbc; +Cc: antongiulio05@gmail.com <antongiulio05@gmail.com>; Heikki Linnakangas <heikki@enterprisedb.com>
On Friday 01 December 2006 7:14 am, antongiulio05@gmail.com wrote:
> If you want dump/restore backup you will contact me - I'll enable new
> user-authentication based on new "unique-key-from-db" but will disable old
> key. You pay for one db not 2,3,..... one db:one license
Good luck with that. Contacting *you* for permission to restore *my* data? you
may want to reconsider that plan.
jan
--
--------------------------------------------------------------
Jan de Visser jdevisser@digitalfairway.com
Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Authentication trick
@ 2006-12-01 14:17 Jan de Visser <jdevisser@digitalfairway.com>
parent: antongiulio05@gmail.com <antongiulio05@gmail.com>
0 siblings, 0 replies; 9+ messages in thread
From: Jan de Visser @ 2006-12-01 14:17 UTC (permalink / raw)
To: pgsql-jdbc; +Cc: antongiulio05@gmail.com <antongiulio05@gmail.com>
On Friday 01 December 2006 9:56 am, antongiulio05@gmail.com wrote:
> > > If you want dump/restore backup you will contact me - I'll enable new
> > > user-authentication based on new "unique-key-from-db" but will disable
> > > old key. You pay for one db not 2,3,..... one db:one license
> >
> > Good luck with that. Contacting *you* for permission to restore *my*
> > data? you may want to reconsider that plan.
>
> In software with license price many thousands of euros it's sad but
> frequent.
Well, all I'm saying is that if I pay 'thousands of euros' I'd like to be
treated with respect and trust, and not be at the whim of my supplier to
allow me to restore my database.
Oh yeah, you are going to respond to them on christmas day when their drive
crashed and they urgently need to fall back on a backup, right?
But it's your party :)
jan
--
--------------------------------------------------------------
Jan de Visser jdevisser@digitalfairway.com
Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Authentication trick
@ 2006-12-01 14:56 antongiulio05@gmail.com <antongiulio05@gmail.com>
parent: Jan de Visser <jdevisser@digitalfairway.com>
0 siblings, 1 reply; 9+ messages in thread
From: antongiulio05@gmail.com @ 2006-12-01 14:56 UTC (permalink / raw)
To: pgsql-jdbc
> > If you want dump/restore backup you will contact me - I'll enable new
> > user-authentication based on new "unique-key-from-db" but will disable old
> > key. You pay for one db not 2,3,..... one db:one license
>
> Good luck with that. Contacting *you* for permission to restore *my* data? you
> may want to reconsider that plan.
In software with license price many thousands of euros it's sad but frequent.
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Authentication trick
@ 2006-12-08 17:02 Markus Schaber <schabi@logix-tt.com>
parent: antongiulio05@gmail.com <antongiulio05@gmail.com>
1 sibling, 0 replies; 9+ messages in thread
From: Markus Schaber @ 2006-12-08 17:02 UTC (permalink / raw)
To: pgsql-jdbc; +Cc: antongiulio05@gmail.com <antongiulio05@gmail.com>
Hi, Guilo,
antongiulio05@gmail.com wrote:
> I want to avoid not authorized dump/restore in other machines (a
> single customer pays for remote upgrading of his db-infos). If you
> want dump/restore backup you will contact me - I'll enable new
> user-authentication based on new "unique-key-from-db" but will
> disable old key.
I hope that _no_ company will _ever_ run that software under that premise.
Imagine a server crash, the admins set up the new server, and now they
have to contact you to get the software running again.
But you're on holidays, or your company went out of business, or your
internet connection is broken, or snail mail needs 5 business days, or
you simply tell them that they have to pay money now...
Mission critial systems should _never_ be dependent on externals' good will.
Your customer might get bancrupt because you're ill for a week.
I hope that you're paying the insurance fee for this risk, to pay any
liabilities.
Thanks,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2006-12-08 17:02 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-30 18:10 Authentication trick antongiulio05@gmail.com <antongiulio05@gmail.com>
2006-12-01 09:31 ` Heikki Linnakangas <heikki@enterprisedb.com>
2006-12-01 10:57 ` antongiulio05@gmail.com <antongiulio05@gmail.com>
2006-12-01 10:47 ` Heikki Linnakangas <heikki@enterprisedb.com>
2006-12-01 12:14 ` antongiulio05@gmail.com <antongiulio05@gmail.com>
2006-12-01 13:43 ` Jan de Visser <jdevisser@digitalfairway.com>
2006-12-01 14:56 ` antongiulio05@gmail.com <antongiulio05@gmail.com>
2006-12-01 14:17 ` Jan de Visser <jdevisser@digitalfairway.com>
2006-12-08 17:02 ` Markus Schaber <schabi@logix-tt.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox