is there a way to find the role/user creation time other than auditlogs.
Also can we find its TTL too
Bringing together the Apache Cassandra experts from the community and DataStax.
Want to learn? Have a question? Want to share your expertise? You are in the right place!
Not sure where to begin? Getting Started
@vijayshanker.oracle_94842 you can use the CQL function
WRITETIME() to get the timestamp for when the data was written.
To illustrate, here is an example where I created the role
cassandra@cqlsh> CREATE ROLE vijay WITH LOGIN = true AND PASSWORD = 'xxxxx';
and here is an example output for the
cassandra@cqlsh> SELECT role, WRITETIME(can_login) FROM system_auth.roles WHERE role = 'vijay'; role | writetime(can_login) -------+---------------------- vijay | 1570581776845000
For more info, see CQL native functions.
On the TTL question, you can't set roles to expire in Cassandra so you can't use the
P.S. There are various ways of converting timestamps to a date. The simplest way is to use an online tool like https://www.epochconverter.com/. FWIW,
1570581776845000 is equivalent to October 9, 2019 12:42 GMT. Cheers!
3 People are following this question.