github.com/philhug/dnscontrol@v0.2.4-0.20180625181521-921fa9849001/docs/_providers/ovh.md (about)

     1  ---
     2  name: Ovh
     3  layout: default
     4  jsId: OVH
     5  ---
     6  # OVH Provider
     7  
     8  ## Configuration
     9  
    10  In your providers config json file you must provide a OVH app-key, app-secret-key and consumer-key:
    11  
    12  {% highlight json %}
    13  {
    14    "ovh":{
    15      "app-key": "your app key",
    16      "app-secret-key": "your app secret key",
    17      "consumer-key": "your consumer key"
    18    }
    19  }
    20  {% endhighlight %}
    21  
    22  See [the Activation section](#activation) for details on obtaining these credentials.
    23  
    24  ## Metadata
    25  
    26  This provider does not recognize any special metadata fields unique to OVH.
    27  
    28  ## Usage
    29  
    30  Example javascript:
    31  
    32  Example javascript (DNS hosted with OVH):
    33  {% highlight js %}
    34  var REG_OVH = NewRegistrar("ovh", "OVH");
    35  var OVH = NewDnsProvider("ovh", "OVH");
    36  
    37  D("example.tld", REG_OVH, DnsProvider(OVH),
    38      A("test","1.2.3.4")
    39  );
    40  {% endhighlight %}
    41  
    42  Example javascript (Registrar only. DNS hosted elsewhere):
    43  
    44  {% highlight js %}
    45  var REG_OVH = NewRegistrar("ovh", "OVH");
    46  var R53 = NewDnsProvider("r53", "ROUTE53");
    47  
    48  D("example.tld", REG_OVH, DnsProvider(R53),
    49      A("test","1.2.3.4")
    50  );
    51  {%endhighlight%}
    52  
    53  
    54  ## Activation
    55  
    56  To obtain the OVH keys, one need to register an app at OVH by following the
    57  [OVH API Getting Started](https://api.ovh.com/g934.first_step_with_api)
    58  
    59  It consist in declaring the app at https://eu.api.ovh.com/createApp/
    60  which gives the `app-key` and `app-secret-key`.
    61  
    62  Once done, to obtain the `consumer-key` it is necessary to authorize the just created app
    63  to access the data in a specific account:
    64  
    65  {% highlight bash %}
    66  curl -XPOST -H"X-Ovh-Application: <you-app-key>" -H "Content-type: application/json" https://eu.api.ovh.com/1.0/auth/credential -d'{
    67    "accessRules": [
    68      {
    69        "method": "DELETE",
    70        "path": "/domain/zone/*"
    71      },
    72      {
    73        "method": "GET",
    74        "path": "/domain/zone/*"
    75      },
    76      {
    77        "method": "POST",
    78        "path": "/domain/zone/*"
    79      },
    80      {
    81        "method": "PUT",
    82        "path": "/domain/zone/*"
    83      },
    84      {
    85        "method": "GET",
    86        "path": "/domain/*"
    87      },
    88      {
    89        "method": "PUT",
    90        "path": "/domain/*"
    91      },
    92      {
    93        "method": "POST",
    94        "path": "/domain/*/nameServers/update"
    95      }
    96    ]
    97  }'
    98  {% endhighlight %}
    99  
   100  It should return something akin to:
   101  {% highlight json %}
   102  {
   103    "validationUrl": "https://eu.api.ovh.com/auth/?credentialToken=<long-token>",
   104    "consumerKey": "<your-consumer-key>",
   105    "state": "pendingValidation"
   106  }
   107  {% endhighlight %}
   108  
   109  Open the "validationUrl" in a brower and log in with your OVH account. This will link the app with your account,
   110  authorizing it to access your zones and domains.
   111  
   112  Do not forget to fill the `consumer-key` of your `creds.json`.
   113  
   114  ## New domains
   115  
   116  If a domain does not exist in your OVH account, DNSControl
   117  will *not* automatically add it. You'll need to do that via the
   118  control panel manually.
   119  
   120  ## Dual providers scenario
   121  
   122  Since OVH doesn't allow to host DNS for a domain that is not registered in their registrar, some dual providers
   123  scenario are not possible:
   124  
   125  | registrar | zone        | working? |
   126  |:---------:|:-----------:|:--------:|
   127  |  OVH      | other       |    √     |
   128  |  OVH      | OVH + other |    √     |
   129  |  other    | OVH         |    X     |
   130  
   131  ## Caveat
   132  
   133  OVH doesn't allow resetting the zone to the OVH DNS through the API. If for any reasons OVH NS entries were
   134  removed the only way to add them back is by using the OVH Control Panel (in the DNS Servers tab, click on the "Reset the
   135  DNS servers" button.