Giter Site home page Giter Site logo

powerdnsbundle's Introduction

PowerDnsBundle

Build Status

This Bundle provides an ReST API for the PowerDNS server written in PHP and integrated in the Symfony framework. It includes methods for creating and maintaining zone and domain records.

Installation

To install you need to include this bundle in your composer.json:

    require: {
         ....
         "syseleven/powerdnsbundle": "dev-master"
    }

Then run `php composer.phar update and activate the Bundle in your kernel and adapt your configuration.

    $bundles = array(
        ...
        new SysEleven\PowerDnsBundle\SysElevenPowerDnsBundle(),
    );

You also need to register JmsSerializer and the FosRestBundle

    $bundles = array(
        ...
        new FOS\RestBundle\FOSRestBundle(),
        new JMS\SerializerBundle\JMSSerializerBundle($this),
    );

The bundle makes some changes to the database structure of PowerDNS but they won't affect the default behaviour.

php app/console doctrine:schema:update --dump-sql -em=<your_entity_manager>

will dump the changes to your current schema, please review them and adapt to your needs.

Configuration

There is not really much configuration for the bundle so far. You can set the entity manager to use with:

sys_eleven_power_dns:
    entity_manager: default

Apart from setting the entity manager, you can also specify default values for new SOA records.

sys_eleven_power_dns:
    entity_manager: default
    soa_defaults:
            primary: ns.domain.com
            hostmaster: [email protected]
            default_ttl: 3600

Then adapt your routing to load the routes:

syseleven_power_dns:
    resource: "@SysElevenPowerDnsBundle/Resources/config/routing.yml"
    prefix: /

Third Party Bundles

The bundle uses the NelmioApiDocBundle to expose the documentation of the route parameters through its interface if you want to use this feature you have to activate and configure the Bundle. Please refer to the bundles homepage for more information. Integration with the FosRestBundle, the bundle uses the View components of the FosRestBundle, if you have the FosRestBundle in use please check your configuration.

API Documentation

You can find a documentation of the resources and its parameter here.

powerdnsbundle's People

Contributors

chrootlogin avatar jackdown avatar markusseifert avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

spfguru doeringc

powerdnsbundle's Issues

[Insight] Database queries should use parameter binding

in Entity/RecordsRepository.php, line 197

If provided by the user, the value of $addStr may allow an SQL injection attack. Avoid concatenating parameters to SQL query strings, and use parameter binding instead.

        $addStr = "";
        if(0 != count($add)) {
            $addStr = sprintf("WHERE %s",implode(' AND ',$add));
        }

        $dql = "SELECT r FROM SysElevenPowerDnsBundle:Records r JOIN r.domain d ".$addStr;

        $em = $this->getEntityManager();
        $query = $em->createQuery($dql);

        if(0 != count($parameters)) {

Posted from SensioLabsInsight

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.