Commit Graph

102 Commits

Author SHA1 Message Date
a3a58f16a5 Initial support for Accounts
This adds initial support for accounts a concept meant to signify a customer, a department or any other entity that somehow owns or manages one or more domains.

The purpose is to be able to assign an account to any number of domains, making it easy to track who owns or manages a domain, significantly improving manageability in setups with a large number of domains.

An account consists of a mandatory, unique `name` and optional `description`, `contact` name and `mail` address. The account `name` is stripped of spaces and symbols, and lower cased before getting stored in the database and in PowerDNS, to help ensure some type of predictability and uniqueness in the database.

The term *account* is actually taken from the PowerDNS database, where the `domains.account` column is used to store the account relationship, in in the form of the account `name`.

The link to a domain in PowerDNS-Admin is done through the `domain.account_id` FOREIGN KEY, that is linked to the `account.id` PRIMARY KEY.

(cherry picked from commits 4e95f33dfb0676d1c401a033c28bca3be7d6ec26, da0d596bd019a339549e2c59630a8fdee65d0e22, 7f06e6aaf4fd8011c784f24b7bbbba5f52aef319, 1c624dad8749024033d1d15dd6242ca52b39f135)
2018-06-04 13:10:02 -02:00
a7e91b6f40 Fix SOA-EDIT-API options
The options for SOA-EDIT-API included was actually the options used for SOA-EDIT, which is a very different beast.
Those options have been swapped out for the options allowed in SOA-EDIT-API and SOA-EDIT-DNSUPDATE.
2018-05-24 16:12:12 -02:00
77f0deade8 Fix #247 2018-04-18 13:29:29 +07:00
8b7653ad4a Change data column data type of DomainTemplateRecord to TEXT 2018-04-12 11:44:56 +07:00
52b6966c83 Check zone serial before allowing user to submit their change. #183 2018-04-12 11:18:44 +07:00
84d4bfaed0 Mark LDAP authentication as external_auth. Fix OTP secret update. #237 2018-04-10 08:59:28 +07:00
fc4e9dc9a0 #233. Make sure password hash is string before inserting to the db 2018-04-06 18:05:38 +07:00
17a892b18d Resolve the conflicts for #228 2018-04-02 13:38:53 +07:00
1c54f008f4 Change string to new format 2018-04-01 07:57:41 +07:00
65da9a7a4f Adjustment in LDAP feature to work with python 3 2018-04-01 07:23:53 +07:00
41d691e2db Merge remote-tracking branch 'maysara/master' into development 2018-04-01 07:01:00 +07:00
cecc0ac9df Merge branch 'hotfix-ldap' into development 2018-03-31 08:26:50 +07:00
29d1cf4117 Adjustment in domain template feature to work with python3 2018-03-31 08:21:02 +07:00
c668c21fc9 Adjustment to prevent exception in Google/Github authentication when local user cannot be created 2018-03-30 17:43:34 +07:00
f318c437c1 Merge remote-tracking branch 'hackedd/feature/server-side-domain-list' into development 2018-03-30 15:34:07 +07:00
b5b3b77acb Adjustment to work with Python3 2018-03-30 13:49:35 +07:00
5ed8a33c7e added feature requested in issue #28 2018-03-28 01:41:33 +02:00
5ea70023ff remove dnssec keys 2018-03-05 15:06:40 +01:00
38be504d17 enable_dns_sec function added 2018-03-01 08:26:29 +01:00
534b9739c2 Merge branch 'hotfix-ldap' of https://github.com/verdel/PowerDNS-Admin into ldapfix-verdel 2018-02-10 13:01:04 +01:00
0436d69ea6 Adding the ability to use 'LDAP_USERNAMEFIELD' and 'LDAP_FILTER' in case of use with Active Directory for authorization 2018-02-09 15:41:19 +03:00
b0caf0ca48 Fix issue with inserting into the database fields 'firstname' and 'lastname' containing non-ascii characters that can be retrieved from LDAP 2018-02-09 15:37:28 +03:00
6f4cc42805 Fix issue with LDAP search filter. It is necessary to bracket the expression with additional filter conditions 2018-02-09 15:32:50 +03:00
cff534890f Deny to delete 'SOA' record 2018-02-07 22:47:52 +03:00
52a5789c85 Add first working draft of domain templating functionality 2018-02-07 22:30:29 +03:00
049a8a4547 optimized domain permission check for normal users 2017-12-04 22:18:28 +01:00
620b0b55e8 replaced non-existent method with code that checks whether user has rights on the domain at hand 2017-12-04 14:00:30 +01:00
971d6b2e28 fixed issue when not using LDAP 2017-11-10 12:28:42 +01:00
d65efe477a ensure authentication isn't possible without password 2017-11-06 23:36:11 +01:00
9e719a3a98 fixed merge 2017-11-03 00:00:04 +01:00
2354eb69c3 Merge branch 'master' into ldap_group_security 2017-11-02 23:23:36 +01:00
9a4021d5e5 Add access control for non-admin users
(cherry picked from commit 6e5b704)
2017-11-01 21:40:15 +01:00
5d09daf8eb Fix dashboard domain query for non-admin users 2017-09-15 15:14:04 +02:00
28c7a195e8 add LDAP direct binding and GROUP_SECURITY 2017-09-03 14:23:18 -04:00
501c5292ab binding with user credentials instead of preset LDAP user/pass 2017-07-24 21:08:25 -04:00
b6ed658cbd Merge pull request #156 from petersipos/feature/automatic-reverse-domain-creation
Feature/automatic reverse domain creation
2016-12-10 12:38:44 +07:00
72e3a82e9e Change reverse domain creation order
With refactoring the get_reverse_domain_name
function, we change the reverse domain checking to
a reverse order. In this way we check the lowest class
(more specific) reverse zone first. When an existing domain found we use it to create the reverse PTR records. If no one existing can be find, The most specific address will be used.
2016-11-28 08:39:07 +01:00
e6e3c39778 Add get_reverse_domain_name functionality
In this way the reverse it is possible to create
auto-ptr records in higher ip classes (eg. class A in IPv4).
Only works with existing higher class domain.

If is isn't find higher class domain, create a lowest class domain, and add there the reverse PTRs.

Also works with IPv6!
2016-11-21 19:44:10 +01:00
b9f95da906 Implement of checking existing higher class ip reverse zones
iteratively checking of existing domains with higher IP
classes. When this function find an existing higher class
domain return with that reverse address. eg. 192.in-addr.arpa

If it is not find  any existing higher class domain it returns with the lowest class domain reverse domain name. eg, 39.168.192.in-addr.arpa
2016-11-21 19:40:43 +01:00
d7db0d5e7a Fix create reverse domain function
Using of wrong variable
2016-11-21 19:36:43 +01:00
c53d9ace89 Extend reverse domain regexp with classes
With this modification it can be possible, to detect
custom IP classes for domains. It just need to 
modify the multipler in regexp {4} or {1}.

In the future it will works automaticly, but not now
2016-11-21 16:55:03 +01:00
cc1a3def5d Add setting read and extra check to adding an auto-ptr record
It is using domain sepcific or global auto-ptr setting
to determine the using of auto-ptr creation.
2016-11-21 13:46:54 +01:00
3911935e3b Add an extra check into reverse domain creation
and also import strtobool
2016-11-21 13:45:17 +01:00
94b0d26142 Delete settings related to domain on domain deleting
Because this bug domain deleting isn't possible when 
a domain specific attribute is set (eg. dyndns).

This modification delete domain settings before domain
deleting.
2016-11-21 13:30:16 +01:00
c81deb0044 Fix SOE-EDIT-API value in reverse-domain creation 2016-11-18 08:30:24 +01:00
7d72cf6088 Put a "." char in a safe way to the records name fields end
First of all we cut all of dot char at the end of the rstring and than we put one there.
this way we make sure that our string contains just
one dot at its end.
2016-11-17 15:04:07 +01:00
3dbbfc16ce Implement auto-ptr deleting functionality
this way we safely remove the corresponding auto created reverse ptr
2016-11-17 11:37:09 +01:00
58ef114f7f Move auto-ptr functionality into a new function 2016-11-17 11:35:09 +01:00
43f1289b98 Remove unnecessary record field in Record.delete()
refferring to pdns api documentation the fields inside the
of the entry delete json is not necessary.
2016-11-17 11:32:28 +01:00
d224bd6798 Fix typo error 2016-11-17 11:29:01 +01:00