ваш_домен.ru

Краткое описание вашей конференции
Текущее время: 02 июл 2024, 15:42

Часовой пояс: UTC




Начать новую тему Ответить на тему  [ 1 сообщение ] 
Автор Сообщение
 Заголовок сообщения: Apache solr site hash
СообщениеДобавлено: 10 июн 2024, 08:00 
Не в сети
Раздал: 0 байт
Скачал: 0 байт
Ратио: Inf.


Зарегистрирован: 02 июн 2024, 04:11
Сообщения: 8187


===>>GO TO THE STORE<<===


п»їBasic Authentication Plugin.
Solr can support Basic authentication for users with the use of the BasicAuthPlugin.
An authorization plugin is also available to configure Solr with permissions to perform various activities in the system. The authorization plugin is described in the section Rule-Based Authorization Plugin.
Enable Basic Authentication.
To use Basic authentication, you must first create a security.json file. This file and where to put it is described in detail in the section Enable Plugins with security.json.
For Basic authentication, the security.json file must have an authentication part which defines the class being used for authentication. Usernames and passwords (as a sha256(password+salt) hash) could be added when the file is created, or can be added later with the Basic authentication API, described below.
The authorization part is not related to Basic authentication, but is a separate authorization plugin designed to support fine-grained user access control. For more information, see the section Rule-Based Authorization Plugin.
An example security.json showing both sections is shown below to show how these plugins can work together:
"authentication" : "blockUnknown" : true , "class" : "solr.BasicAuthPlugin" , "credentials" :"solr" : "IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c=" >, "realm" : "My Solr users" , "forwardCredentials" : false >, "authorization" : "class" : "solr.RuleBasedAuthorizationPlugin" , "permissions" :["name" : "security-edit" , "role" : "admin" >], "user-role" :"solr" : "admin" > >>
There are several things defined in this file:
1 Basic authentication and rule-based authorization plugins are enabled. 2 The parameter "blockUnknown":true means that unauthenticated requests are not allowed to pass through. 3 A user called 'solr', with a password 'SolrRocks' has been defined. 4 We override the realm property to display another text on the login prompt. 5 The parameter "forwardCredentials":false means we let Solr’s PKI authenticaion handle distributed request instead of forwarding the Basic Auth header. 6 The 'admin' role has been defined, and it has permission to edit security settings. 7 The 'solr' user has been defined to the 'admin' role.
Save your settings to a file called security.json locally. If you are using Solr in standalone mode, you should put this file in $SOLR_HOME .
If blockUnknown does not appear in the security.json file, it will default to false . This has the effect of not requiring authentication at all. In some cases, you may want this; for example, if you want to have security.json in place but aren’t ready to enable authentication. However, you will want to ensure that this parameter is set to true in order for authentication to be truly enabled in your system.
If realm is not defined, it will default to solr .
If you are using SolrCloud, you must upload security.json to ZooKeeper. You can use this example command, ensuring that the ZooKeeper port is correct:
bin/solr zk cp file:path_to_local_security.json zk:/security.json -z localhost:9983.
If you have defined ZK_HOST in solr.in.sh / solr.in.cmd (see instructions) you can omit -z from the above command.
Caveats.
There are a few things to keep in mind when using the Basic authentication plugin.
Credentials are sent in plain text by default. It’s recommended to use SSL for communication when Basic authentication is enabled, as described in the section Enabling SSL. A user who has access to write permissions to security.json will be able to modify all the permissions and how users have been assigned permissions. Special care should be taken to only grant access to editing security to appropriate users. Your network should, of course, be secure. Even with Basic authentication enabled, you should not unnecessarily expose Solr to the outside world.
Editing Basic Authentication Plugin Configuration.
An Authentication API allows modifying user IDs and passwords. The API provides an endpoint with specific commands to set user details or delete a user.
API Entry Point.
v1: http://localhost:8983/solr/admin/authentication v2: http://localhost:8983/api/cluster/secur ... entication.
This endpoint is not collection-specific, so users are created for the entire Solr cluster. If users need to be restricted to a specific collection, that can be done with the authorization rules.
Add a User or Edit a Password.
The set-user command allows you to add users and change their passwords. For example, the following defines two users and their passwords:
V1 API.
curl --user solr:SolrRocks http://localhost:8983/solr/admin/authentication -H 'Content-type:application/json' -d '>'
V2 API.
curl --user solr:SolrRocks http://localhost:8983/api/cluster/secur ... entication -H 'Content-type:application/json' -d '>'
Delete a User.
The delete-user command allows you to remove a user. The user password does not need to be sent to remove a user. In the following example, we’ve asked that user IDs 'tom' and 'harry' be removed from the system.
V1 API.
curl --user solr:SolrRocks http://localhost:8983/solr/admin/authentication -H 'Content-type:application/json' -d ''
V2 API.
curl --user solr:SolrRocks http://localhost:8983/api/cluster/secur ... entication -H 'Content-type:application/json' -d ''
Set a Property.
Set properties for the authentication plugin. The currently supported properties for the Basic Authentication plugin are blockUnknown , realm and forwardCredentials .
V1 API.
curl --user solr:SolrRocks http://localhost:8983/solr/admin/authentication -H 'Content-type:application/json' -d '>'
V2 API.
curl --user solr:SolrRocks http://localhost:8983/api/cluster/secur ... entication -H 'Content-type:application/json' -d '>'
The authentication realm defaults to solr and is displayed in the WWW-Authenticate HTTP header and in the Admin UI login page. To change the realm, set the realm property:
V1 API.
curl --user solr:SolrRocks http://localhost:8983/solr/admin/authentication -H 'Content-type:application/json' -d '>'
V2 API.
curl --user solr:SolrRocks http://localhost:8983/api/cluster/secur ... entication -H 'Content-type:application/json' -d '>'
Using Basic Auth with SolrJ.
There are two main ways to use SolrJ with Solr servers protected by basic authentication: either the permissions can be set on each individual request, or the underlying http client can be configured to add credentials to all requests that it sends.
Per-Request Basic Auth Credentials.
The simplest way to setup basic authentication in SolrJ is use the setBasicAuthCredentials method on each request as in this example:
SolrRequest req ; //create a new request object req . setBasicAuthCredentials ( userName , password ); solrClient . request ( req );
QueryRequest req = new QueryRequest ( new SolrQuery ( "*:*" )); req . setBasicAuthCredentials ( userName , password ); QueryResponse rsp = req . process ( solrClient );
While this is method is simple, it can often be inconvenient to ensure the credentials are provided everywhere they’re needed. It also doesn’t work with the many SolrClient methods which don’t consume SolrRequest objects.
Global (JVM) Basic Auth Credentials.
Alternatively, users can use SolrJ’s PreemptiveBasicAuthClientBuilderFactory to add basic authentication credentials to all requests automatically. To enable this feature, users should set the following system property -Dsolr.httpclient.builder.factory=org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory . PreemptiveBasicAuthClientBuilderFactory allows applications to provide credentials in two different ways:
The basicauth system property can be passed, containing the credentials directly (e.g., -Dbasicauth=username:password ). This option is straightforward, but may expose the credentials in the command line, depending on how they’re set. The solr.httpclient.config system property can be passed, containing a path to a properties file holding the credentials. Inside this file the username and password can be specified as httpBasicAuthUser and httpBasicAuthPassword , respectively.
httpBasicAuthUser = my_username httpBasicAuthPassword = secretPassword.
Using the Solr Control Script with Basic Auth.
Add the following line to the solr.in.sh or solr.in.cmd file. This example tells the bin/solr command line to to use "basic" as the type of authentication, and to pass credentials with the user-name "solr" and password "SolrRocks":
SOLR_AUTH_TYPE = "basic" SOLR_AUTHENTICATION_OPTS = "-Dbasicauth=solr:SolrRocks"
В©2019 Apache Software Foundation. All rights reserved. Site Version: 8.1 Site last generated: 2019-06-11.


butik radiusite bangi
james blunt website
wedding cake prices walmart
where to get grand daddy purple seeds
camden market weed
can you buy marijuana seeds in chicago
virginia marijuana card medical marijuana doctors online
b blunt salon price list
land for sale in durban cbd
buy weed in new jersey
lemon haze price per gram
can u buy weed seeds in illinois
buy crary weed roller
3 tiered wedding cake price
coffee shop weed malta
weed jars to buy
ak 47 weed strain price
cbd flower shop reddit
2012 lib tech skunk ape for sale
the northern lights book online
shisha hookah price in pakistan
buy weed online westcoastcannabis burnaby bc
weed and feed to buy
black cherry soda strain price
buy medical weed online 4x4
buy weed springfield ma
14g of weed price
hash morocco price
where to buy cookies weed in las vegas
1 pound of weed for sale
weed shops open late
northern lights shop hop
where to buy marijuana rochester ny
sour diesel price
girl scout cookies 2024 sale dates
how to get a medical marijuana card in fl
kk weed price
2 grams of weed price
northern lights pictures for sale uk
price of weed quarter ounce
lavender kush seeds for sale
amorino gelato price
weed prices gram
marihuana semena shop
moon rocks price
buy thc test kit canada
dab beer price

Buy undecorated wedding cake
Priceline stores melbourne cbd
1 8 of weed price
Where to get medical marijuana card in tucson
Where can you buy weed bags
Buy medical weed online pennsylvania
Selling weed in the hood
Skywalker og price
Price charas goa
First legal weed purchase
Stop selling girl scout cookies
Sour diesel price 2025
Blue dream weed for sale
Bc northern lights bloom box price
Cannabis seeds cheapest
Medical marijuana stores in durham region
Cannabis training university online 1
Marijuana edibles online
Buy weed accessories
Where to buy stihl gas weed eaters
Wonder worm dab for sale
Weed seeds for sale in oregon
Buy glyphosate weed killer
Andrea ghiselli gelato
Rivers stores sydney cbd 1
Where can you buy weed bags
Auckland cbd farmers market
Buy marijuana online with paypal


Вернуться к началу
 Профиль  
Ответить с цитатой  
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ 1 сообщение ] 

Часовой пояс: UTC


Кто сейчас на конференции

Сейчас этот форум просматривают: Bing [Bot], Google [Bot], Methrentot, Tutorials71, uvumiveonuhu, wormdrink и гости: 11


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
cron
Создано на основе phpBB® Forum Software © phpBB Group
ppkBB3cker v.2 © 2008-2017 @ PPK | Icon Theme by Everaldo.com Design Studio
Русская поддержка phpBB
Ресурс не предоставляет электронные версии произведений, а занимается лишь коллекционированием и каталогизацией ссылок, присылаемых и публикуемых на форуме нашими читателями. Если вы являетесь правообладателем какого-либо представленного материала и не желаете чтобы ссылка на него находилась в нашем каталоге, свяжитесь с нами и мы незамедлительно удалим её. Файлы для обмена на трекере предоставлены пользователями сайта, и администрация не несёт ответственности за их содержание. Просьба не заливать файлы, защищенные авторскими правами, а также файлы нелегального содержания!