<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted1">
I am currently using MySQL to proxy authorization using the <b>auth_db</b> module. I am utilizing the
<b>proxy_authorize</b> function to authorize users in a MySQL table, and it is working perfectly.
<div><br class="ContentPasted1">
</div>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted1">
However, I need to switch to <b>MongoDB</b> as my database instead of MySQL. The issue is that it appears
<b>auth_db</b> only supports <b>MySQL</b> and <b>PostgreSQL</b> databases. <b>My concern is that I must use MongoDB as the database for authorization in OpenSIPS. Is it possible to authorize users in OpenSIPS using MongoDB with the auth_db module, or should
I consider an alternative module or approach?</b><br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted1">
<b><br>
</b></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted1">
<span class="ContentPasted2"><b>Load auth_db module</b>
<div style="font-weight: bold;"><br class="ContentPasted2">
</div>
<blockquote itemscope="" itemtype="https://schemas.microsoft.com/QuotedText" style="border-left: 3px solid rgb(200, 200, 200); border-top-color: rgb(200, 200, 200); border-right-color: rgb(200, 200, 200); border-bottom-color: rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex;">
<div class="ContentPasted2" style="font-weight: bold;">loadmodule "auth_db.so"</div>
<div class="ContentPasted2" style="font-weight: bold;">modparam("auth_db", "db_url", "mysql://DB_USER:DB_PASSWORD@DB_HOST/DB_NAME")</div>
<div class="ContentPasted2" style="font-weight: bold;">modparam("auth_db", "load_credentials", "$avp(tmp_id)=id")</div>
<div class="ContentPasted2" style="font-weight: bold;">modparam("auth_db", "calculate_ha1", yes)</div>
<div class="ContentPasted2" style="font-weight: bold;">modparam("auth_db", "password_column", "password")</div>
</blockquote>
<div style="font-weight: bold;"><br class="ContentPasted2">
</div>
<div class="ContentPasted2" style="font-weight: bold;">check condition in routes.</div>
<div style="font-weight: bold;"><br class="ContentPasted2">
</div>
</span></div>
<blockquote itemscope="" itemtype="https://schemas.microsoft.com/QuotedText" style="border-left: 3px solid rgb(200, 200, 200); border-top-color: rgb(200, 200, 200); border-right-color: rgb(200, 200, 200); border-bottom-color: rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex;">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="ContentPasted1">
<span class="ContentPasted2">
<div class="ContentPasted2" style="font-weight: bold;">if (!proxy_authorize("", "TABLE)_NAME")) {</div>
<div class="ContentPasted2" style="font-weight: bold;"> proxy_challenge("", "0");</div>
<div class="ContentPasted2" style="font-weight: bold;"> exit;</div>
<b>}</b><br>
</span></div>
<div class="">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</div>
</blockquote>
<div class="elementToProof">
<div id="Signature">
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0">
Best Regards,
<div class="ContentPasted0">----</div>
<div class="ContentPasted0">Harsh Patel</div>
<div class="ContentPasted0">Team Lead.</div>
<div class="ContentPasted0">Inextrix Technologies Pvt Ltd (www.inextrix.com)</div>
<div class="ContentPasted0">Mo: +1 315 898 1049 </div>
<div class="ContentPasted0">https://www.inextrix.com/</div>
<div><br class="ContentPasted0">
</div>
<div class="ContentPasted0"><span style="color: rgb(23, 78, 134);">Disclaimer:</span></div>
<span style="color: rgb(23, 78, 134);">The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it.
If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking action in reliance on the contents of this information is strictly prohibited and may be unlawful. Please notify the sender immediately and destroy
all copies of this message and any attachments contained in it.</span><br>
</div>
</div>
</div>
</div>
</body>
</html>