mirror of
https://github.com/internetee/registry.git
synced 2025-07-26 04:28:27 +02:00
Merge branch 'master' of github.com:domify/registry
This commit is contained in:
commit
8199b9986b
4 changed files with 7 additions and 3 deletions
|
@ -13,7 +13,7 @@ class Epp::SessionsController < EppController
|
||||||
success = true
|
success = true
|
||||||
@api_user = ApiUser.find_by(login_params)
|
@api_user = ApiUser.find_by(login_params)
|
||||||
|
|
||||||
if request.ip == ENV['webclient_ip'] && !Rails.env.test?
|
if request.ip == ENV['webclient_ip'] && (!Rails.env.test? || !Rails.env.development?)
|
||||||
client_md5 = Certificate.parse_md_from_string(request.env['HTTP_SSL_CLIENT_CERT'])
|
client_md5 = Certificate.parse_md_from_string(request.env['HTTP_SSL_CLIENT_CERT'])
|
||||||
server_md5 = Certificate.parse_md_from_string(File.read(ENV['cert_path']))
|
server_md5 = Certificate.parse_md_from_string(File.read(ENV['cert_path']))
|
||||||
if client_md5 != server_md5
|
if client_md5 != server_md5
|
||||||
|
|
|
@ -309,7 +309,7 @@ class EppController < ApplicationController
|
||||||
|
|
||||||
# filter pw
|
# filter pw
|
||||||
if request_command == 'login' && frame.present?
|
if request_command == 'login' && frame.present?
|
||||||
frame.gsub!(/<pw>.+<\/pw>/, '<pw>[FILTERED]</pw>')
|
frame.gsub!(/pw>.+<\//, 'pw>[FILTERED]</')
|
||||||
end
|
end
|
||||||
|
|
||||||
ApiLog::EppLog.create({
|
ApiLog::EppLog.create({
|
||||||
|
|
|
@ -2,3 +2,7 @@
|
||||||
|
|
||||||
# Configure sensitive parameters which will be filtered from the log file.
|
# Configure sensitive parameters which will be filtered from the log file.
|
||||||
Rails.application.config.filter_parameters += [:password]
|
Rails.application.config.filter_parameters += [:password]
|
||||||
|
|
||||||
|
Rails.application.config.filter_parameters << lambda do |key, value|
|
||||||
|
value.gsub!(/pw>.+<\//, 'pw>[FILTERED]</') if key =~ /frame|raw_frame/i
|
||||||
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@ To quickly test the API, use curl:
|
||||||
|
|
||||||
curl -q -k --cert user.crt.pem --key user.key.pem https://TBA/repp/v1/accounts/balance -u username:password
|
curl -q -k --cert user.crt.pem --key user.key.pem https://TBA/repp/v1/accounts/balance -u username:password
|
||||||
|
|
||||||
Test API endpoint: TBA
|
Test API endpoint: https://testepp.internet.ee/repp/v1
|
||||||
Production API endpoint: TBA
|
Production API endpoint: TBA
|
||||||
|
|
||||||
Main communication specification through Restful EPP (REPP):
|
Main communication specification through Restful EPP (REPP):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue