fistful-server/config/sys.config

205 lines
6.2 KiB
Plaintext
Raw Normal View History

2018-06-13 13:43:48 +00:00
[
2019-06-27 15:58:45 +00:00
{kernel, [
{log_level, info},
{logger, [
{handler, default, logger_std_h, #{
level => debug,
config => #{
type => {file, "/var/log/fistful-server/console.json"},
sync_mode_qlen => 20
},
formatter => {logger_logstash_formatter, #{}}
}}
2018-06-13 13:43:48 +00:00
]}
]},
{scoper, [
2019-06-27 15:58:45 +00:00
{storage, scoper_storage_logger}
2018-06-13 13:43:48 +00:00
]},
2018-07-05 10:57:59 +00:00
{dmt_client, [
{cache_update_interval, 5000}, % milliseconds
2018-07-05 10:57:59 +00:00
{max_cache_size, #{
2020-01-27 13:40:48 +00:00
elements => 20,
memory => 52428800 % 50Mb
2018-07-05 10:57:59 +00:00
}},
2020-01-27 13:40:48 +00:00
{woody_event_handlers, [
{scoper_woody_event_handler, #{
event_handler_opts => #{
formatter_opts => #{
max_length => 1000
}
}
}}
]},
2018-07-05 10:57:59 +00:00
{service_urls, #{
'Repository' => <<"http://dominant:8022/v1/domain/repository">>,
2018-07-05 10:57:59 +00:00
'RepositoryClient' => <<"http://dominant:8022/v1/domain/repository_client">>
}}
]},
{party_client, [
{services, #{
party_management => "http://hellgate:8022/v1/processing/partymgmt"
}},
{woody, #{
cache_mode => safe, % disabled | safe | aggressive
options => #{
woody_client => #{
event_handler =>
{scoper_woody_event_handler, #{
event_handler_opts => #{
formatter_opts => #{
max_length => 1000
}
2020-01-27 13:40:48 +00:00
}
}}
}
}
}}
]},
2018-06-13 13:43:48 +00:00
{fistful, [
{providers, #{
<<"ncoeps">> => #{
payment_institution_id => 100,
routes => [<<"mocketbank">>],
identity_classes => #{
<<"person">> => #{
name => <<"Person">>,
contract_template_id => 10000,
initial_level => <<"anonymous">>,
levels => #{
<<"anonymous">> => #{
name => <<"Anonymous">>,
contractor_level => none
},
<<"partly-identified">> => #{
name => <<"Partially identified">>,
contractor_level => partial
},
<<"identified">> => #{
name => <<"Fully identified">>,
contractor_level => full
}
},
challenges => #{
<<"esia">> => #{
name => <<"ЕСИА">>,
base => <<"anonymous">>,
target => <<"partly-identified">>
}
2018-06-13 13:43:48 +00:00
}
}
}
}
2018-07-05 10:57:59 +00:00
}},
{services, #{
'eventsink' => "http://machinegun:8022/v1/event_sink",
'automaton' => "http://machinegun:8022/v1/automaton",
'accounter' => "http://shumway:8022/shumpune",
2018-07-06 13:49:30 +00:00
'identification' => "http://identification:8022/v1/identification"
}}
]},
{ff_transfer, [
{max_session_poll_timeout, 14400}, %% 4h
{withdrawal, #{
2020-07-16 13:45:18 +00:00
default_transient_errors => [
<<"authorization_failed:temporarily_unavailable">>
],
party_transient_errors => #{
<<"ExamplePartyID">> => [
<<"account_limit_exceeded:amount">>,
<<"authorization_failed:destination_rejected">>
]
}
}}
2018-07-08 16:58:55 +00:00
]},
2020-02-07 10:34:23 +00:00
{p2p_transfer, [
{max_session_poll_timeout, 14400}, %% 4h
2020-02-07 10:34:23 +00:00
{score_id, "fraud"}
]},
2018-07-05 10:57:59 +00:00
{ff_server, [
2018-06-13 13:43:48 +00:00
{ip, "::"},
{port, 8022},
2020-01-27 13:40:48 +00:00
{default_woody_handling_timeout, 30000},
2018-07-06 13:49:30 +00:00
{net_opts, [
% Bump keepalive timeout up to a minute
{timeout, 60000}
]},
{scoper_event_handler_options, #{
event_handler_opts => #{
formatter_opts => #{
max_length => 1000,
max_printable_string_length => 80
}
}
}},
{health_check, #{
disk => {erl_health, disk, ["/", 99]},
memory => {erl_health, cg_memory, [99]},
service => {erl_health, service, [<<"fistful-server">>]}
}},
2018-11-02 11:21:59 +00:00
{eventsink, #{
identity => #{
namespace => 'ff/identity'
2018-11-02 11:21:59 +00:00
},
wallet => #{
namespace => 'ff/wallet_v2'
2018-11-02 11:21:59 +00:00
},
withdrawal => #{
namespace => 'ff/withdrawal_v2'
2018-11-09 11:38:05 +00:00
},
deposit => #{
namespace => 'ff/deposit_v1'
2018-11-09 11:38:05 +00:00
},
destination => #{
namespace => 'ff/destination_v2'
2018-11-09 11:38:05 +00:00
},
source => #{
namespace => 'ff/source_v1'
2018-11-15 11:32:50 +00:00
},
withdrawal_session => #{
namespace => 'ff/withdrawal/session_v2'
2020-02-07 10:34:23 +00:00
},
p2p_transfer => #{
namespace => 'ff/p2p_transfer_v1'
2020-02-07 10:34:23 +00:00
},
p2p_session => #{
namespace => 'ff/p2p_transfer/session_v1'
},
w2w_transfer => #{
namespace => 'ff/w2w_transfer_v1'
},
p2p_template => #{
namespace => 'ff/p2p_template_v1'
2018-11-02 11:21:59 +00:00
}
}}
]},
{how_are_you, [
{metrics_publishers, [
% {hay_statsd_publisher, #{
% key_prefix => <<"fistful-server.">>,
% host => "localhost",
% port => 8125
% }}
]}
]},
FF-143: Uac authorization (#165) * Add uac dependency * use uac to issue tokens * Configure uac * Authorize operations with uac * Issue tokens with uac in tests * wip: furthemore migrate to uac * Remove unreachable case * Adjust wapi config in tests * Don't start old authorizer * Fix auth context creation in tests * Fix all definitions of create_auth_ctx * Revert "Don't start old authorizer" This reverts commit 2636fcfa48e798a8fb07534e512ea5b494f57b19. * Fix old config naming * Deduplicate unique id generation * Provide dummy snowflake config * Use macro for signee * Authorize operation withc UAC (#140) * Verify tokens with uac * Implement dummy authorization * Return quote verification * Restore authorizer code order * Restore signer code order * Update commentaries * Provide operation access lists * Give party read/write permissions to the test tokens * Introduce more resources, standardize CreateWithdrawal authoriation * Download file with read access * Authorize withdrawals with dedicated permission * Fix permissions in tests * Upgrade uac * Remove redundant auth related modules * Use uac issue * Update tests * Fix opaque type usage * Add domain_name to uac config * Remove signee from test config * Rollback to old roles * Upgrade uac * Fix for wapi wallet tests * Use macro for domain * Remove domain name from configs * Use uac utils functions * Make operation access less strict * Remove unused signee option * Replace get_party_id with uac function * Create ACL migration layer * Reimplement operation access * Fix style * Remove reintroduced auth code * Upgrade uac * Remove redundant verification option * Suppress opaque introspection dialyzer warning * Fix nested resources ACLs * Issue test quota without resource access Co-Authored-By: Andrew Mayorov <a.mayorov@rbkmoney.com> * Adapt new p2p code * Rename refactor and move role mapping * Refactor roles mapping * Use uac dev branch * Fix merge incompatibilities * Fix even more incompatibilities * Bump uac and adjust code to it * Add operation access for new ops * Upgrade uac * Issue tokens the new way * Fix merge artifacts * Create simple resource hierarchy for new operations * Fix authorization by bearer * Fix missed merge issues * Apply suggestions from code review Co-Authored-By: Andrew Mayorov <a.mayorov@rbkmoney.com> * Verify partyID in p2p continuation tokens, add signee to wapi config * Remove OperationID from log message where it is already present in meta Co-Authored-By: Andrew Mayorov <a.mayorov@rbkmoney.com> * Add signee to app config * Test if unauthorized user still can create withdrawal using grants * Do withdrawal specific authorization inside create_withdrawal * Test wapi_SUITE default with both tokens, specify domain when issuing tokens * Upgrade uac * Specify which domains to decode * Throw withdrawal authorization errors * Split too long lines * Simplify grant authorization * Do not handle 'missing' errors, handle wallet notfound * Rework error mapping slightly * Add resource to insufficient_access/claim error * Try bumping cowboy_cors to fix CI dialyzer error * Use fork-master version of cowboy_cors Co-authored-by: Andrew Mayorov <a.mayorov@rbkmoney.com>
2020-05-14 10:44:52 +00:00
{snowflake, [
% {machine_id, 42}
FF-143: Uac authorization (#165) * Add uac dependency * use uac to issue tokens * Configure uac * Authorize operations with uac * Issue tokens with uac in tests * wip: furthemore migrate to uac * Remove unreachable case * Adjust wapi config in tests * Don't start old authorizer * Fix auth context creation in tests * Fix all definitions of create_auth_ctx * Revert "Don't start old authorizer" This reverts commit 2636fcfa48e798a8fb07534e512ea5b494f57b19. * Fix old config naming * Deduplicate unique id generation * Provide dummy snowflake config * Use macro for signee * Authorize operation withc UAC (#140) * Verify tokens with uac * Implement dummy authorization * Return quote verification * Restore authorizer code order * Restore signer code order * Update commentaries * Provide operation access lists * Give party read/write permissions to the test tokens * Introduce more resources, standardize CreateWithdrawal authoriation * Download file with read access * Authorize withdrawals with dedicated permission * Fix permissions in tests * Upgrade uac * Remove redundant auth related modules * Use uac issue * Update tests * Fix opaque type usage * Add domain_name to uac config * Remove signee from test config * Rollback to old roles * Upgrade uac * Fix for wapi wallet tests * Use macro for domain * Remove domain name from configs * Use uac utils functions * Make operation access less strict * Remove unused signee option * Replace get_party_id with uac function * Create ACL migration layer * Reimplement operation access * Fix style * Remove reintroduced auth code * Upgrade uac * Remove redundant verification option * Suppress opaque introspection dialyzer warning * Fix nested resources ACLs * Issue test quota without resource access Co-Authored-By: Andrew Mayorov <a.mayorov@rbkmoney.com> * Adapt new p2p code * Rename refactor and move role mapping * Refactor roles mapping * Use uac dev branch * Fix merge incompatibilities * Fix even more incompatibilities * Bump uac and adjust code to it * Add operation access for new ops * Upgrade uac * Issue tokens the new way * Fix merge artifacts * Create simple resource hierarchy for new operations * Fix authorization by bearer * Fix missed merge issues * Apply suggestions from code review Co-Authored-By: Andrew Mayorov <a.mayorov@rbkmoney.com> * Verify partyID in p2p continuation tokens, add signee to wapi config * Remove OperationID from log message where it is already present in meta Co-Authored-By: Andrew Mayorov <a.mayorov@rbkmoney.com> * Add signee to app config * Test if unauthorized user still can create withdrawal using grants * Do withdrawal specific authorization inside create_withdrawal * Test wapi_SUITE default with both tokens, specify domain when issuing tokens * Upgrade uac * Specify which domains to decode * Throw withdrawal authorization errors * Split too long lines * Simplify grant authorization * Do not handle 'missing' errors, handle wallet notfound * Rework error mapping slightly * Add resource to insufficient_access/claim error * Try bumping cowboy_cors to fix CI dialyzer error * Use fork-master version of cowboy_cors Co-authored-by: Andrew Mayorov <a.mayorov@rbkmoney.com>
2020-05-14 10:44:52 +00:00
]},
2020-02-07 10:34:23 +00:00
{p2p, [
{score_id, <<"fraud">>}
]},
{prometheus, [
{collectors, [default]}
2018-06-13 13:43:48 +00:00
]}
].