sec_populate_secret_tokens_cache (private)
sec_populate_secret_tokens_cache
Defined in packages/acs-tcl/tcl/security-procs.tcl
Randomly populates the secret_tokens cache.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set num_tokens [parameter::get -package_id $::acs::kernel_id -parameter NumberOfCachedSecretTokens -default 100] # this is called directly from security-init.tcl, # so it runs during the install before the data model has been loaded if { [db_table_exists secret_tokens] } { db_foreach get_secret_tokens {} { nsv_set secret_tokens $token_id $token } } db_release_unused_handlesGeneric XQL file: packages/acs-tcl/tcl/security-procs.xql
PostgreSQL XQL file: <fullquery name="sec_populate_secret_tokens_cache.get_secret_tokens"> <querytext> select token_id, token from secret_tokens, (select cast(random() * count(*) - :num_tokens as integer) as first from secret_tokens) r where token_id >= r.first and r.first + :num_tokens > token_id </querytext> </fullquery>packages/acs-tcl/tcl/security-procs-postgresql.xql
Oracle XQL file: <fullquery name="sec_populate_secret_tokens_cache.get_secret_tokens"> <querytext> select * from ( select token_id, token from secret_tokens sample(15) ) where rownum < :num_tokens </querytext> </fullquery>packages/acs-tcl/tcl/security-procs-oracle.xql