]> WPIA git - gigi.git/commit
upd: move revocation info to own table
authorFelix Dörre <felix@dogcraft.de>
Sat, 12 Aug 2017 18:31:57 +0000 (20:31 +0200)
committerFelix Dörre <felix@dogcraft.de>
Thu, 31 Aug 2017 22:54:31 +0000 (00:54 +0200)
commit58cd89cc80616e95650e455019ec8c1c20483a29
tree95bfaf8680b7ee76575c738f1f91a48ae68f321e
parent3b67d296c05a8963083cd2c537586b27f8e0a22d
upd: move revocation info to own table

This commit moves the information about certificate revocation into an
own table. All locations accessing this information have been adapted.

Old Behavior:
Table "certs" has a column "revoked" that is "NULL" for all non-revoked
certificates and contains the revocation time (from cassiopeia) for all
revoked certificates.

on revoke: gigi creates a "job" indicating the row in "certs" to revoke
on revoke execution: cassiopeia marks the "job" done and inserts a
revocation date in "certs"

Possible States:
1. revoked is NULL, no revocation job exists
2. revoked is NULL, revocation job exists.
(2b. this transition is not a transaction in cassiopeia so an in-between
state might be observed)
3. revoked is not NULL, revocation job is marked as done

New Behavior:
Table "certs" doesn't have a "revoked" column instead there is a new
table.

on revoke: gigi inserts the "revocation"-row without a revocation date
filled in, but with the reason and other information about the
revocation. Additionally a "job" is created to trigger cassiopeia.
on revoke execution: cassiopeia marks the job as done and updates the
revocation date in the revocation column.

Possible States:
1. no revocation entry and not revocation job exist.
(1b. again strictly speaking not a transaction here)
2. revocation entry without date and revocation job exist
(2b. also still no transaction)
3. date in revocation entry is filled and revocation job is marked done

Change-Id: Ie2a51a16eed420b284f9fd5660e057da1069b740
13 files changed:
src/club/wpia/gigi/api/RevokeCertificate.java
src/club/wpia/gigi/database/DatabaseConnection.java
src/club/wpia/gigi/database/tableStructure.sql
src/club/wpia/gigi/database/upgrade/from_28.sql [new file with mode: 0644]
src/club/wpia/gigi/dbObjects/Certificate.java
src/club/wpia/gigi/dbObjects/CertificateOwner.java
src/club/wpia/gigi/dbObjects/Job.java
src/club/wpia/gigi/dbObjects/Organisation.java
src/club/wpia/gigi/dbObjects/SupportedUser.java
src/club/wpia/gigi/pages/account/certs/CertificateModificationForm.java
src/club/wpia/gigi/pages/account/certs/RevokeSingleCertForm.java
tests/club/wpia/gigi/TestCertificate.java
util-testing/club/wpia/gigi/util/SimpleSigner.java