Verifying OAuth Token Migration
Once migration is complete, you can verify if the tokens were written to the destination.
For example, if migrating from MySQL to Cassandra, you can verify in a
CQLSH prompt whether a specific source token is present:
- Take a random token from source tokens file(s) or MySQL:
$ tail -f tokens/token_1551107102000_1554628596851.json {"id":155218,"updated":1554463157000,"areaId":711,"spkey":"fzaqf787e3pu3uqcz764uj9y","mapi":"v4kf8heb7r8k2xcjyzv8xdjz","accessToken":"d4uhgedp24hj8hdfqkqmexsu","accessTokenType":0,"grantType":"implicit","scope":"scope","expires":1555428066000,"macKey":null,"macAlgorithm":1,"refreshToken":null,"refreshTokenExpire":null,"userToken":null,"isLocal":0}
- Login to Cassandra container (for example, K8 environment):
$ kubectl exec -it cass-set-0-0 bash
- Got to CQL shell prompt and find the specific token which should have been migrated:
$ cqlsh Connected to Tibco Mashery Local Reference Cluster at 127.0.0.1:9042. [cqlsh 5.0.1 | Cassandra 3.11.2 | CQL spec 3.4.4 | Native protocol v4] Use HELP for help. cqlsh> use oauth2; cqlsh> select * from atokens where atoken = 'druds84xr7k7tyupvwc5gwkj'; atoken | spkey | atokentype | created | expires | grnt | macalgo | mackey | mapi | scope | updated | utoken --------------------------+--------------------------+------------+---------------------------------+---------------------------------+----------+---------+--------+--------------------------+-------+---------------------------------+----------------------- druds84xr7k7tyupvwc5gwkj | m9f5kyzfjjrssz6d5sfkbuw3 | 0 | 2019-01-22 19:31:54.000000+0000 | 2019-04-08 05:19:36.000000+0000 | password | 1 | null | 4c7fmwh59w3ufn7pxt92qwx9 | null | 2019-01-22 19:31:54.000000+0000 | null
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.