Security

Opensolr Security — find answers to your questions

API - Update HTTP Auth

Sets a new username and password on your Opensolr Index. Every search and every update must then send them.

Endpointhttps://opensolr.com/solr_manager/api/update_http_auth
MethodGET
Authemail and api_key of your account, as GET or POST parameters: Authentication.
In the panelHTTP Basic Auth

01 · Parameters

core_nameRequired

The name of your index.

usernameRequired

The new username. Use letters and digits only.

passwordRequired

The new password. Use letters and digits only.

02 · Example

curl -s "https://opensolr.com/solr_manager/api/update_http_auth?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index&username=searchapp&password=NEW_PASSWORD"

03 · Answer

status is true and msg holds the answer of the server. On a cluster master, every replica gets the same credentials and replication is set up again.

Update every app, plugin and script that connects to the index, or they get refused.

04 · Errors

NOT_OWNER_ERRORHTTP 200

The index is not yours.

ERROR_AUTHENTICATION_FAILEDHTTP 403

The email and API key do not match.

ERROR_RATE_LIMIT_PER_MINUTEHTTP 429

Too many calls. Wait for the Retry-After seconds: Rate limits.

05 · Related

Remove the username and password: remove_http_auth.

Limit the addresses that may reach the index: add_ip.

Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.

Read Full Answer

API - Add index IP access rule

Lets one address reach one part of your Opensolr Index. A request from an address with no matching rule is refused, even with the right password.

Endpointhttps://opensolr.com/solr_manager/api/add_ip
MethodGET
Authemail and api_key of your account, as GET or POST parameters: Authentication.
In the panelIP restriction

01 · Parameters

core_nameRequired

The name of your index.

ipRequired

One IPv4 address, such as 203.0.113.10, or all for every address.

handlerRequired

The request handler the address may use: /select for searches, /update for writes, / for every handler.

02 · Example

curl -s "https://opensolr.com/solr_manager/api/add_ip?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index&ip=203.0.113.10&handler=/"

03 · Answer

{
    "status": true,
    "msg": "IP_ADDED_OK"
}

A new index starts with one rule, all on /. Remove it with delete_ip once your own rules are in place.

04 · Errors

ERROR_INVALID_IP_ADDRESSHTTP 200

ip is not one IPv4 address or all.

ERROR_CANNOT_ADD_MORE_THAN_N_IP_ADDRESSESHTTP 200

The index has as many rules as your plan allows. N is the number of your plan.

ERROR_INVALID_CORE_NAMEHTTP 200

No index name, or the index is not yours.

ERROR_AUTHENTICATION_FAILEDHTTP 403

The email and API key do not match.

ERROR_RATE_LIMIT_PER_MINUTEHTTP 429

Too many calls. Wait for the Retry-After seconds: Rate limits.

05 · Related

List the rules: get_ip_list. Remove one: delete_ip.

Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.

Read Full Answer

API - Get index IP list

Lists the IP rules of your Opensolr Index: each address, and the request handler it may use.

Endpointhttps://opensolr.com/solr_manager/api/get_ip_list
MethodGET
Authemail and api_key of your account, as GET or POST parameters: Authentication.
In the panelIP restriction

01 · Parameters

core_nameRequired

The name of your index.

02 · Example

curl -s "https://opensolr.com/solr_manager/api/get_ip_list?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index"

03 · Answer

status is true and msg is the list of rules, each with its ip and handler.

04 · Errors

ERROR_NOT_CORE_OWNERHTTP 200

The index is not yours.

ERROR_AUTHENTICATION_FAILEDHTTP 403

The email and API key do not match.

ERROR_RATE_LIMIT_PER_MINUTEHTTP 429

Too many calls. Wait for the Retry-After seconds: Rate limits.

05 · Related

Add a rule: add_ip. Remove one: delete_ip.

Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.

Read Full Answer

Loading more articles...