{"id":7470,"date":"2021-02-20T21:56:15","date_gmt":"2021-02-20T21:56:15","guid":{"rendered":"https:\/\/www.use-snip.com\/kb\/?post_type=ht_kb&#038;p=7470"},"modified":"2021-03-05T16:24:09","modified_gmt":"2021-03-05T16:24:09","slug":"restricting-users-by-agent","status":"publish","type":"ht_kb","link":"https:\/\/www.use-snip.com\/kb\/knowledge-base\/restricting-users-by-agent\/","title":{"rendered":"Restricting Users, by Agent"},"content":{"rendered":"<p>This article describes how to add an <strong>NTRIP Agent<\/strong> <strong>Restriction<\/strong> to user accounts in the <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> NTRIP Caster.<\/p>\n<h2>The NTRIP Agent Restrictions tab<\/h2>\n<p>This tab is used to control which User Agents (NTRIP Client software) the <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/adding-user-accounts\/\" target=\"_blank\" rel=\"noopener\">User Account<\/a> is allowed to connect with. Use this feature to restrict the list of approved devices (hardware or software) this user account can use to connect to your Caster.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7468\" src=\"https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2021\/02\/agentTab1.png\" alt=\"\" width=\"600\" height=\"730\" srcset=\"https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2021\/02\/agentTab1.png 600w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2021\/02\/agentTab1-247x300.png 247w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2021\/02\/agentTab1-41x50.png 41w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2021\/02\/agentTab1-320x389.png 320w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>All well constructed <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/question-what-is-an-ntrip-client\/\" target=\"_blank\" rel=\"noopener\">NTRIP Clients<\/a> provide a &#8220;User agent&#8221; string as part of the HTTP header used when they connect to your Caster.\u00a0 The precise format varies between the NTRIP Rev1 and Rev2 connection protocols (<a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/ntrip-rev1-versus-rev2-formats\/\" target=\"_blank\" rel=\"noopener\">this article<\/a> summarizes the main differences with examples).<\/p>\n<p style=\"padding-left: 120px;\">Want a quick look at some common NTRIP Client agents?<br \/>\n<a href=\"http:\/\/rtk2go.com:2101\/SNIP::N-AGENT\" target=\"_blank\" rel=\"noopener\">Click here<\/a> to see what has connected to the <a href=\"http:\/\/RTK2go.com\" target=\"_blank\" rel=\"noopener\">RTK2go.com<\/a>:2101 Public Caster recently.<\/p>\n<p>But the primary take-away is that well behaved NTRIP Clients identify the software (and often the version) they are using when they connect.\u00a0 And therefore this can also be used as yet another way to control how your user accounts are allowed to connect to your Caster.<\/p>\n<p>The checking method used by <span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> performs a simple string search using the &#8220;root name&#8221; of the agent name in a case sensitive sub-string match.\u00a0 NTRIP Clients using an agent that matches the sub-string are either <em>allowed<\/em> to <em>prohibited<\/em> (depending on which list the matching sub-string was in).<\/p>\n<p>In the below image the <strong>Select None<\/strong> button has been pressed, resulting in a listing all the known Agents from which the user can select the ones of interest.\u00a0 The &#8220;root name&#8221; of over 80 common agents are currently loaded, and the operator can add items (or edit and extend an existing item) with the <strong>Add&#8230;<\/strong> button in the normal way.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7469\" src=\"https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2021\/02\/agentTab2.png\" alt=\"\" width=\"600\" height=\"730\" srcset=\"https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2021\/02\/agentTab2.png 600w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2021\/02\/agentTab2-247x300.png 247w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2021\/02\/agentTab2-41x50.png 41w, https:\/\/www.use-snip.com\/kb\/wp-content\/uploads\/2021\/02\/agentTab2-320x389.png 320w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>The check box <strong>Case Sensitive Matches<\/strong> should in general be left checked to prevent false positive matches.<\/p>\n<p>The checkbox called <strong>Hide those Not Selected<\/strong> is used to hide agents which are not checked.\u00a0 This has value for clutter reduction so that the operator can clearly see which agents have been selected.<\/p>\n<p>When a user with this account connects, the agent is checked against the Allowed and Prohibited lists, if the <strong>Activate<\/strong> checkbox is enabled.\u00a0\u00a0 If the user is not allowed to connect due to this restriction, an entry in the console log is added to inform the operator.<\/p>\n<p>The most typical use case is a Caster operator that wishes to ensure that a given user account connects only with the NTRIP Client software they are authorized to be using.<\/p>\n<h3>On sub-string matching<\/h3>\n<p>Care should be taken when adding new Agents to avoid a false match.\u00a0 Short strings are always a concern in this regard.\u00a0 For example; entering only the term &#8220;NTRIP&#8221; would match nearly every agent, which is probably not the desired outcome.<\/p>\n<p>By the same logic, strings which are too long may match on a very specific version of the agent when perhaps less specificity is required.<\/p>\n<p>As an example, consider the following fifteen NTRIP Client agents:<\/p>\n<pre style=\"padding-left: 80px;\">NTRIP RTKLIB\/2.4.1\u00a0 \r\nNTRIP RTKLIB\/2.4.2\u00a0 \r\nNTRIP RTKLIB\/2.4.3\u00a0 \r\nNTRIP RTKLIB\/2.4.3 Emlid \r\nNTRIP RTKLIB\/2.4.3 demo5\u00a0 \r\nNTRIP RTKLIB\/2.4.3_b33\u00a0 \r\nNTRIP RTKLIB\/demo5_b30\u00a0 \r\nNTRIP RTKLIB\/demo5_b31\u00a0 \r\nNTRIP RTKLIB\/demo5_b31a\u00a0 \r\nNTRIP RTKLIB\/demo5_b33a\u00a0 \r\nNTRIP RTKLIB\/demo5_b33b2\u00a0 \r\nNTRIP RTKLIB\/demo5_b33c\u00a0 \r\nNTRIP RTKLIB\/demo5_b33d \r\nNTRIP RTKLIB\/demo5_b33e\u00a0 \r\nNTRIP RTKLIB\/demo5_b33f<\/pre>\n<p>And then consider the following possible agent strings and their outcomes.<\/p>\n<ul>\n<li>The agent string &#8220;NTRIP RTKLIB\/&#8221; would match <strong>all<\/strong> of these<\/li>\n<li>The agent string &#8220;NTRIP RTKLIB\/2&#8221; would match <strong>6<\/strong> of these<\/li>\n<li>The agent string &#8220;NTRIP RTKLIB\/d&#8221; would match <strong>9<\/strong> of these<\/li>\n<li>The agent string &#8220;NTRIP RTKLIB\/demo5&#8221; would match <strong>9<\/strong> of these<\/li>\n<li>The agent string &#8220;NTRIP RTKLIB\/2.4.3 demo&#8221; would match <strong>1<\/strong> of these<\/li>\n<li>The agent string &#8220;NTRIP RTKLIB\/demo5_b3&#8221; would match <strong>9<\/strong> of these<\/li>\n<li>The agent string &#8220;NTRIP RTKLIB\/demo5_b33&#8221; would match <strong>6<\/strong> of these<\/li>\n<li>The agent string &#8220;NTRIP RTKLIB\/demo5_b33c&#8221; would match <strong>1<\/strong> of these<\/li>\n<li>The agent string &#8220;NTRIP RTKLIB\/demo5_b33cc&#8221; would match <strong>None<\/strong> of these<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Note also that this restriction does not operate on browsers or bots (<span style=\"color: #0000ff;\"><strong>SNIP<\/strong><\/span> logic detects browser agent connections and deals with this suitably, typically by returning a Caster table).\u00a0 So there no need to enter agent strings for these connection types.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 80px;\"><span style=\"color: #008000;\"><strong> Note:<\/strong><\/span>\u00a0 The <strong>NTRIP Agent Restrictions<\/strong> tab is an advanced feature. It requires a <span style=\"color: #993300;\"><em><strong>Pro<\/strong> <\/em><\/span>license\u00a0 and depends on the presences of an active \u201cEnhanced User Management\u201d Plug-In to be used.<\/p>\n<p>About other <a href=\"https:\/\/www.use-snip.com\/kb\/knowledge-base\/user-accounts-adding-restrictions\/\">user account restrictions<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article describes how to add an NTRIP Agent Restriction to user accounts in the SNIP NTRIP Caster. The NTRIP Agent Restrictions tab This tab is used to control which User Agents (NTRIP Client software) the User Account is allowed to connect with. Use this feature to restrict the list [&hellip;]<\/p>\n","protected":false},"author":13,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"ht-kb-category":[283],"ht-kb-tag":[498,118,494],"class_list":["post-7470","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-managing-user-accounts","ht_kb_tag-ntrip-agent","ht_kb_tag-ntrip-client","ht_kb_tag-restrictions"],"_links":{"self":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/7470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/comments?post=7470"}],"version-history":[{"count":17,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/7470\/revisions"}],"predecessor-version":[{"id":7598,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb\/7470\/revisions\/7598"}],"wp:attachment":[{"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/media?parent=7470"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=7470"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.use-snip.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=7470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}