Opened 11 days ago
Last modified 5 days ago
#3195 addressed enhancement
Schema Changes to Support Web User Email Verification
| Reported by: | Kay Kittell | Owned by: | Benjamin Haag |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Database, Schema Changes | Version: | N/A |
| Severity: | 5 -- Moderate Effort | Keywords: | |
| Cc: | gary.kinard@…, marty.reisinger@… | Database Engine: | N/A |
| Operating System: | N/A |
Description
Please add a column to the web_user table, verify_token (nvarchar(255), null), which will store a hashed value.
The new column will be used when a new user first creates a log in.
Then please provide the script to me so that I can run it on my dev box since I'm not able to alter tables with SSMS.
Attachments (1)
Change History (10)
comment:1 by , 11 days ago
comment:2 by , 11 days ago
| Status: | new → accepted |
|---|
comment:3 by , 11 days ago
| Cc: | added |
|---|
comment:4 by , 11 days ago
| Summary: | Add columns to web_user table → Schema Changes to Support Web User Email Verification |
|---|
comment:5 by , 6 days ago
| Priority: | medium → major |
|---|
I am ready to implement this in code, but need the columns in the table before I can begin working on this.
comment:6 by , 6 days ago
email_verification
Represents an instance of a user adding or changing the email address. Allows for both tracking the verification process and serves as a record of email address changes per requestor.
web_cooperator_id Links request to cooperator; there will be a one-many relationship over the lifetime of a web coop record.
pending_email_address Stores the email address that the user is requesting. Will differ from that address until verification succeeds.
status_code Limited to four values specified in CHECK constraint. Effectively represents the status of a work item, which email_verification is.
created_date Standard GG audit fields.
created_by
verified_date Date on which email address is successfully verified. Distinct from web_cooperator.email_verified_date: Specifies when the email verification request was completed, vs. when the web cooperator's current email address was verified.
last_email_sent_date Indicates when the most recent email-verification request was sent. Intended to allow for use case in which a user selects "resend" multiple times consecutively. Also allows for use of a resend interval.
attempt_count Tracks *failed* verification attempts; intended to identify suspicious activity and enforce limits (see above).
email_verification_token
Handles the actual security mechanism; stores temporary credential. One-to-many relationship with email_verification; a given verification request can have multiple tokens. Also allows for finer-grained logging of user activity.
email_verification_token_id (PK) Unique identifier for the token record.
email_verification_id (FK) Connects the token to the verification request.
Important because the token itself does not need a direct connection to a web cooperator or their email address.
token Temporary credential
created_date Standard GG audit fields.
created_by
expiration_date Indicates when a token becomes invalid -- prevents validation URLs being used indefinitely.
consumed_date When the token was successfully used. Tokens should be single-use.
For example: Token consumed_date Token A 10:15 AM Token B NULL Token A has been used. Token B has not. If someone clicks Token A's link again, verification should fail.
revoked_date When the token was explicitly invalidated. Different from expiration:
Example: 1. User requests verification. 2. PW sends Token A. 3. User requests another verification email. 4. PW sends Token B. At this point, Token A should be revoked, even though it hasn't expired; token B becomes the only valid token.
comment:7 by , 6 days ago
| Cc: | added |
|---|---|
| Severity: | 1 -- Low Effort → 5 -- Moderate Effort |
by , 6 days ago
| Attachment: | Trac_3195.sql added |
|---|
comment:8 by , 6 days ago
| Status: | accepted → addressed |
|---|
comment:9 by , 5 days ago
This complicates things WAY too much and you altered the WRONG table. Web_user, not web_cooperator. Email goes into the web_USER table.
Please do as I asked.

Table design/modifications pending my review.