[security] First round of fixes for doAs, introduced select2