Hi folks
I would like to ask if there’s any way to optimize the query statement that privacyIDEA executes to retrieve and user from my sqlresolver (postgreSQL).
I’m asking because in a few methods it’s thanking a lot of time to respond back; as well I create a Index in the DB where PrivacyIDEA lookup the users.
CREATE INDEX index_user_login ON users (user_login)
I cauth this simple mesure:
validatePinResponse >>>> time: 2171ms
verifyPinOtp >>>> time: 6442ms
How I request to the API.
const tokenInfo = async function(user, serial, token) {
const options = {
uri: `${config.privacyIdea.pideaIp}:${config.privacyIdea.pideaPort}/token/?user=${user}&tokenrealm=${config.privacyIdea.realm}&serial=${serial}`,
method: 'GET',
headers: {
'Authorization': token,
},
json: true,
encoding: 'utf-8',
rejectUnauthorized: false,
};
try {
let response;
response = await request(options);
return response;
}
...
};
const validationCheckPinOtp = async function(user, serial, token, pin, transactionId) {
const options = {
uri: `${config.privacyIdea.pideaIp}:${config.privacyIdea.pideaPort}/validate/check?pass=${pin}&serial=${serial}`,
method: 'POST',
headers: {
'Authorization': token,
},
json: true,
encoding: 'utf-8',
rejectUnauthorized: false,
};
try {
let response;
response = await request(options);
console.log(response);
return response;
...
};
Thank you in advance