forked from inex/IXP-Manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathixp_api.php
More file actions
173 lines (145 loc) · 6.6 KB
/
ixp_api.php
File metadata and controls
173 lines (145 loc) · 6.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?php
/*
* Copyright (C) 2009 - 2019 Internet Neutral Exchange Association Company Limited By Guarantee.
* All Rights Reserved.
*
* This file is part of IXP Manager.
*
* IXP Manager is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version v2.0 of the License.
*
* IXP Manager is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GpNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License v2.0
* along with IXP Manager. If not, see:
*
* http://www.gnu.org/licenses/gpl-2.0.html
*/
// API config options for IXP Manager
return [
/*
|--------------------------------------------------------------------------
| JSON Export Schema
|--------------------------------------------------------------------------
|
*/
'json_export_schema' => [
// if false, an API key is required
'public' => env( 'IXP_API_JSONEXPORTSCHEMA_PUBLIC', true ),
// or - we can set a static key here if we like:
'access_key' => env( 'IXP_API_JSONEXPORTSCHEMA_ACCESS_KEY', false ),
// some IXs want to exclude some information:
'excludes' => [
'rfc5398' => env( 'IXP_API_JSONEXPORTSCHEMA_EXCLUDE_RFC5398', true ),
'rfc6996' => env( 'IXP_API_JSONEXPORTSCHEMA_EXCLUDE_RFC6996', true ),
'tags' => env( 'IXP_API_JSONEXPORTSCHEMA_EXCLUDE_TAGS', false ),
'asnum' => env( 'IXP_API_JSONEXPORTSCHEMA_EXCLUDE_ASNUM', false ),
'switch' => env( 'IXP_API_JSONEXPORTSCHEMA_EXCLUDE_SWITCH', false ),
'ixp' => env( 'IXP_API_JSONEXPORTSCHEMA_EXCLUDE_IXP', false ),
'member' => env( 'IXP_API_JSONEXPORTSCHEMA_EXCLUDE_MEMBER', false ),
'intinfo' => env( 'IXP_API_JSONEXPORTSCHEMA_EXCLUDE_INTINFO', false ),
],
],
/*
|--------------------------------------------------------------------------
| RIR details for updating RIR AS/AS-SET objects
|--------------------------------------------------------------------------
|
*/
'rir' => [
'password' => env( 'IXP_API_RIR_PASSWORD', 'xxxxx' ),
'email' => [
'from' => env( 'IXP_API_RIR_EMAIL_FROM', null ),
'to' => env( 'IXP_API_RIR_EMAIL_TO', null ),
],
'ripe_api_key' => env( 'IXP_RIPE_API_KEY', null ),
],
/*
|--------------------------------------------------------------------------
| Nagios Configuration Generation
|--------------------------------------------------------------------------
|
*/
'nagios' => [
'birdseye_check' => env( 'IXP_API_NAGIOS_BIRDSEYE_CHECK',
"/usr/local/nagios-plugins-other/nagios-check-birdseye.php" ),
'birdseye_bgp_session_check' => env( 'IXP_API_NAGIOS_BIRDSEYE_BGP_SESSION_CHECK',
"/usr/local/nagios-plugins-other/nagios-check-birdseye-bgp-sessions.php" ),
'infra_host' => env( 'IXP_API_NAGIOS_INFRA_HOST', "generic-host" ),
'customer_host' => env( 'IXP_API_NAGIOS_CUSTOMER_HOST', "generic-host" ),
'infra_service' => env( 'IXP_API_NAGIOS_INFRA_SERVICE', "generic-service" ),
'customer_service' => env( 'IXP_API_NAGIOS_CUSTOMER_SERVICE', "generic-service" ),
],
/*
|--------------------------------------------------------------------------
| PEERING DB
|--------------------------------------------------------------------------
|
*/
'peeringDB' => [
'username' => env( 'IXP_API_PEERING_DB_USERNAME', null ),
'password' => env( 'IXP_API_PEERING_DB_PASSWORD', null ),
'api-key' => env( 'IXP_API_PEERING_DB_API_KEY', null ),
// you should not need to change this. The %s is either "$un:$pw@" or an empty string
'url' => env( 'IXP_API_PEERING_DB_URL', "https://%swww.peeringdb.com/api" ),
'fac_api' => env( 'IXP_API_PEERING_DB_FAC_URL', "https://api.peeringdb.com/api/fac" ),
'ixp_api' => env( 'IXP_API_PEERING_DB_IXP_URL', "https://api.peeringdb.com/api/ix" ),
'ixp_www' => env( 'IXP_WWW_PEERING_DB_IXP_URL', "https://www.peeringdb.com/ix/%%COL%%" ),
'api_cache_ttl' => 3600, // how long to cache /ix results
],
/*
|--------------------------------------------------------------------------
| IXP DB
|--------------------------------------------------------------------------
|
*/
'IXPDB' => [
'ixp_api' => env( 'IXP_API_IXPDB_IXP_URL', "https://api.ixpdb.net/v1/provider/list" ),
'ixp_www' => env( 'IXP_WWW_IXPDB_IXP_URL', "https://ixpdb.euro-ix.net/en/explore/ixp/%%COL%%/" ),
],
/*
|--------------------------------------------------------------------------
| Whois servers
|--------------------------------------------------------------------------
|
*/
'whois' => [
// all responses cached for:
'cache_ttl' => env( 'IXP_API_WHOIS_CACHE_TTL', 60 * 60 * 12 ),
'asn' => [
'host' => env( 'IXP_API_WHOIS_ASN_HOST', 'whois.peeringdb.com' ),
'port' => env( 'IXP_API_WHOIS_ASN_PORT', 43 ),
],
'asn2' => [
'host' => env( 'IXP_API_WHOIS_ASN2_HOST', 'whois.cymru.com' ),
'port' => env( 'IXP_API_WHOIS_ASN2_PORT', 43 ),
],
'prefix' => [
'host' => env( 'IXP_API_WHOIS_PREFIX_HOST', 'whois.radb.net' ),
'port' => env( 'IXP_API_WHOIS_PREFIX_PORT', 43 ),
],
],
/*
|--------------------------------------------------------------------------
| Ripe Atlas
|--------------------------------------------------------------------------
|
*/
'atlas_measurement_key' => env( 'ATLAS_MEASUREMENT_KEY', '' ),
/*
|--------------------------------------------------------------------------
| Unsecured API paths
|--------------------------------------------------------------------------
|
| IXP Manager v7.1.0 introduced an admin/ prepend on APIs for securing them.
|
| The default was switched from true to false in v7.2.0.
|
| See: https://docs.ixpmanager.org/install/security/
*/
'unsecured_api_access' => env( 'UNSECURED_API_ACCESS', false ),
];