|
| 1 | +appId: eu.siacs.conversations |
| 2 | +name: FAST token rotation |
| 3 | +tags: |
| 4 | + - fast-rotation |
| 5 | +onFlowStart: |
| 6 | + - runScript: scripts/checkHealth.js |
| 7 | +--- |
| 8 | + |
| 9 | +- runScript: scripts/startSession.js |
| 10 | + |
| 11 | +- runFlow: |
| 12 | + file: subflows/login.yaml |
| 13 | + |
| 14 | +- runFlow: |
| 15 | + file: subflows/dismiss-onboarding-dialogs.yaml |
| 16 | + |
| 17 | +- assertVisible: "Once you start a new conversation.*" |
| 18 | + |
| 19 | +# The initial, password-based login should obtain and cache a FAST (XEP-0484) token |
| 20 | +- runScript: |
| 21 | + file: scripts/checkForLogs.js |
| 22 | + env: |
| 23 | + PATTERN: 'jane@example\.org: storing hashed token Mechanism\[' |
| 24 | + |
| 25 | +# A freshly issued token starts in a "new" slot, and is only promoted to "current" the first |
| 26 | +# time it's actually used - the rotation-threshold check (see configs/fast-rotation.xml, which |
| 27 | +# forces it to always be due) only applies to a "current" token. So it's this token's SECOND |
| 28 | +# use, not its first, where the server should rotate it. |
| 29 | + |
| 30 | +# Reconnect #1: first use of the initial token - promotes it, no rotation expected yet. |
| 31 | +- runScript: scripts/startSession.js |
| 32 | + |
| 33 | +- launchApp |
| 34 | + |
| 35 | +- assertVisible: "Once you start a new conversation.*" |
| 36 | + |
| 37 | +- runScript: |
| 38 | + file: scripts/checkForLogs.js |
| 39 | + env: |
| 40 | + PATTERN: 'jane@example\.org.*quick start with HT' |
| 41 | + MAX_ATTEMPTS: 30 |
| 42 | + DELAY_MS: 1000 |
| 43 | + |
| 44 | +- runScript: |
| 45 | + file: scripts/checkForLogs.js |
| 46 | + env: |
| 47 | + PATTERN: 'jane@example\.org.*logged in \(using SASL_2\)' |
| 48 | + MAX_ATTEMPTS: 30 |
| 49 | + DELAY_MS: 1000 |
| 50 | + |
| 51 | +# Reconnect #2: second use of that same token - now "current", so the server should rotate it. |
| 52 | +- runScript: scripts/startSession.js |
| 53 | + |
| 54 | +- launchApp |
| 55 | + |
| 56 | +- assertVisible: "Once you start a new conversation.*" |
| 57 | + |
| 58 | +- runScript: |
| 59 | + file: scripts/checkForLogs.js |
| 60 | + env: |
| 61 | + PATTERN: 'jane@example\.org.*quick start with HT' |
| 62 | + MAX_ATTEMPTS: 30 |
| 63 | + DELAY_MS: 1000 |
| 64 | + |
| 65 | +- runScript: |
| 66 | + file: scripts/checkForLogs.js |
| 67 | + env: |
| 68 | + PATTERN: 'jane@example\.org.*logged in \(using SASL_2\)' |
| 69 | + MAX_ATTEMPTS: 30 |
| 70 | + DELAY_MS: 1000 |
| 71 | + |
| 72 | +- runScript: |
| 73 | + file: scripts/checkForLogs.js |
| 74 | + env: |
| 75 | + PATTERN: 'jane@example\.org: storing hashed token Mechanism\[' |
| 76 | + MAX_ATTEMPTS: 30 |
| 77 | + DELAY_MS: 1000 |
| 78 | + |
| 79 | +# Reconnect #3: proves the rotated token was actually persisted and is usable - if rotation had |
| 80 | +# silently broken (e.g. the replacement was never stored, or was stored but unusable), this |
| 81 | +# reconnect would fail FAST and fall back to a password prompt instead. |
| 82 | +- runScript: scripts/startSession.js |
| 83 | + |
| 84 | +- launchApp |
| 85 | + |
| 86 | +- assertVisible: "Once you start a new conversation.*" |
| 87 | + |
| 88 | +- runScript: |
| 89 | + file: scripts/checkForLogs.js |
| 90 | + env: |
| 91 | + PATTERN: 'jane@example\.org.*quick start with HT' |
| 92 | + MAX_ATTEMPTS: 30 |
| 93 | + DELAY_MS: 1000 |
| 94 | + |
| 95 | +- runScript: |
| 96 | + file: scripts/checkForLogs.js |
| 97 | + env: |
| 98 | + PATTERN: 'jane@example\.org.*logged in \(using SASL_2\)' |
| 99 | + MAX_ATTEMPTS: 30 |
| 100 | + DELAY_MS: 1000 |
0 commit comments