Commit Graph

1147 Commits

Author SHA1 Message Date
Rob Crittenden
19272e5b8e Fix group deletion
ticket 347
2010-10-13 17:58:15 -04:00
Rob Crittenden
53c218cf2f Return non-zero when the number of entries from *-find returned is zero.
ticket 325
2010-10-13 13:00:58 -04:00
Rob Crittenden
3d55b66e48 Enforce the maximum username length from cn=ipaconfig
ticket 226
2010-10-13 13:00:51 -04:00
Rob Crittenden
16931cfe2d Detect when DNS is not configured and return an error message
It would be nicer if we disabled the command altogether but this would require
checking the server to see every time the ipa command is executed (which would
be bad). We can't store this in a configuration file because it is possible
to add a DNS post-install (and it would require adding this to every single
client install).

ticket 147
2010-10-13 13:00:07 -04:00
Rob Crittenden
0197ebbb7b Add ability to import automount files from the command-line.
Support is fairly basic right now and will only work on the CLI. All
the work is done on the client side.

To continue past errors use the --continue option.

Fixed a bug where direct mounts weren't always added properly.

Added real user documentation to the plugin.

ticket 78
2010-10-12 18:07:26 -04:00
Adam Young
dcc0d76ef9 dns metadata
This is a little bit of a copy and paste approach, as the code for__json__
 was copied from baseldap.  Long term, we want to rewrite this plugin as
an extension of baseldap anyway.
2010-10-12 14:30:13 -04:00
Endi S. Dewata
1dc0a3ab3e Certificate management for services.
This is an initial implementation of certificate management for
services. It addresses the mechanism required to view and update
certificates. The complete UI implementation will be addressed in
subsequent patches.

On the server side, the service.py has been modified to define
usercertificate in the service object's takes_params. This is
needed to generate the proper JSON metadata which is needed by
the UI. It also has been modified to accept null certificate for
deletion.

On the client side, the service details page has been modified to
display the base64-encoded certificate in a text area. When the
page is saved, the action handler will store the base64-encoded
certificate in the proper JSON structure. Also the service name
and service hostname are now displayed in separate fields.

The details configuration has been modified to support displaying
and updating certificates. The structure is changed to use maps
to define sections and fields. A section contains name, label,
and an array of fields. A field contains name, label, setup
function, load function, and save function. This is used to
implement custom interface and behavior for certificates.

All other entities, test cases, and test data have been updated
accordingly. Some functions and variables have been renamed to
improve clarity and consistency.
2010-10-12 14:17:24 -04:00
Rob Crittenden
d2a9ccf407 Accept an incoming certificate as either DER or base64 in the service plugin.
The plugin required a base64-encoded certificate and always decoded it
before processing. This doesn't work with the UI because the json module
decodes binary values already.

Try to detect if the incoming value is base64-encoded and decode if
necessary. Finally, try to pull the cert apart to validate it. This will
tell us for sure that the data is a certificate, regardless of the format
it came in as.

ticket 348
2010-10-08 13:15:03 -04:00
Rob Crittenden
be6aa7039b Return non-zero when group membership change fails, no empty fail list.
There is no point (and it is confusing) to print an empty list when
modifying group membership fails, so suppress it.

If any membership change fails we should return non-zero.

tickets 271, 273, 274
2010-10-08 10:11:54 -04:00
Rob Crittenden
bed6e81935 If an HBAC category is 'all' don't allow individual objects to be added.
Basically, make 'all' mutually exclusive. This makes debugging lots easier.
If say usercat='all' there is no point adding specific users to the rule
because it will always apply to everyone.

ticket 164
2010-10-08 10:11:41 -04:00
Adam Young
9cb3a07aca policy and config
Population of the policy and entites tabs.
    DNS and ACI are broken due to PLugin issues
    Fix for entities without search
    Added new files to Makefile.am
    used rolegroup.js file as the start point, renamed to serverconfig.js
2010-10-07 14:51:02 -04:00
Pavel Zuna
8a2ea9a7e0 Fix inconsistent error message when deleting groups that don't exist.
Ticket #292
2010-10-06 10:01:59 -04:00
Pavel Zuna
6606b2a9c5 Rename user-lock and user-unlock to user-enable user-disable.
Ticket #165
2010-10-06 09:20:44 -04:00
Pavel Zuna
9832780414 Add 'continuous' mode to LDAPDelete. Fix *-del unit tests.
Ticket #321
2010-10-06 09:20:41 -04:00
Pavel Zuna
bf053652bc Generate additional positional arguments for baseldap commands from takes_args. 2010-10-06 09:20:38 -04:00
Jr Aquino
bfd2e383dc Added modifications to the sudorule plugin to reflect the schema update. 2010-10-05 21:37:59 -04:00
Adam Young
38490d35d3 phonenumbers
Added in params for phone number  types: phone, fax, mobile ,pager
2010-10-01 16:05:08 -04:00
Rob Crittenden
f906aaf376 Groups are now created as POSIX by default.
ticket 241
2010-10-01 14:16:36 -04:00
Rob Crittenden
aac7badb77 Remove reliance on the name 'admin' as a special user.
And move it to the group 'admins' instead. This way the admin user can
be removed/renamed.

ticket 197
2010-10-01 13:38:52 -04:00
Pavel Zuna
c106922c13 Add Delete capabilities to Search facet in the WebUI.
Ticket #206
2010-10-01 10:00:10 -04:00
Pavel Zuna
838c1f2c94 Add LDAPMultiQuery base class and make it the base of LDAPDelete.
In other words: make *-del commands accept 1 or more primary keys
of entries to be deleted.

Ticket #20
2010-10-01 10:00:01 -04:00
Rob Crittenden
b5fcfb1495 Fix sizelimit/timelimit options not working in user_find 2010-09-30 17:48:00 -04:00
Rob Crittenden
c298560a1e Handle an empty base_dn and no cn=ipaconfig in the ldap2 backend, fix migration.
We lacked good error messages if the user/group container you used doesn't
exist.

Add a --continue option so things can continue if you use a bad user/group
container. This has the side-effect of letting you migrate just users or
groups by using a bad container for the one you don't want.

Fix a Gettext() error when displaying the migrated password message.

ticket 289
2010-09-28 13:39:28 -04:00
Jr Aquino
af48654cbc Add plugins for Sudo Commands, Command Groups and Rules 2010-09-27 22:38:06 -04:00
Adam Young
c187702bfe I18N for web
Performing I18N completely on the server, to leverage the
existing gettext architecture.
Also, the browser does not have access to the Language header.

Added the additional po files for a set of required languages

conflict with install/static/ipa.js was resolved.

Note that the addition of the .po files in this patch is necessary.
In order to get Transifex support, we need to update the LINGUAS
file with the languages for which we want support.  If we don't
add the .po files in, they get automatically generated by the rpmbuild
process.  Our implementation of gettext has a bug in it (It might
be F13 thing) where the the Plurals line is not getting correctly
transformed, which causes a build failure.  However, since the
RPM would have the .po files  anyway, we should revision control
the ones we have, even if they are empty.

Fixed the Bug reporting url to the original value.
Corrected the Chartype encoding for UK
2010-09-27 13:30:55 -04:00
Rob Crittenden
ed56112023 Use the principal from the context in whoami.
ticket 227
2010-09-24 09:55:03 -04:00
Rob Crittenden
47f849ec21 Try to make topic help less confusing. Rename Related to Topic commands.
Also don't print the commands at the bottom if the plugin implements
only one command, like the passwd plugin.

ticket 105
2010-09-23 12:04:13 -04:00
Rob Crittenden
9fd7fedb76 Add an example for creating an HBAC service and service group.
Try to tie in the hbacsvc and hbacsvcgroup plugins better through an
example.

ticket 159
2010-09-23 11:59:14 -04:00
Rob Crittenden
89d2280a79 Add command to resolve a hostname. Returns True or raises NotFound.
Note that this doesn't rely on IPA having a configured DNS server.
It passes the host name to the resolver and doesn't try to do a lookup
within the IPA DNS directly (e.g. no internal LDAP search).

Tries to determine if a domain is included and if not then the IPA
domain is added. This won't do the right thing if there are multiple
configured subdomains.

ticket 106
2010-09-23 11:50:16 -04:00
Pavel Zuna
1bb412239d Big webUI patch.
Quick summary:
- use jQuery UI and jQuery BBQ libraries
- code restructuring

The patch has so many changes they can't be listed here. Many parts
of the code have been rewritten from scrach.

See freeipa-devel mailing list:
webUI code restructuring [wall of text, diagrams, ... you've been warned!]
2010-09-07
2010-09-17 19:42:40 -04:00
Adam Young
5fd09b016b user-find whoami
Now no longer breaks user-find with a filter
Uses the corrected Params for getting option
printf style strings
2010-09-15 15:04:42 -04:00
Adam Young
30def30eaf Revert "user whoami"
This reverts commit bef0690a2f.
2010-09-14 16:42:30 -04:00
Adam Young
bef0690a2f user whoami
Added a whoami option to the user, allows the user to query their own information based on their Kerberos principal
2010-09-14 13:57:56 -04:00
Rob Crittenden
67a4549519 Remove some additional instances of krbV from ipa-client
Make two krbV imports conditional. These aren't used during a client
install so should cause no problems.

Also fix the client installer to use the new env option in ipautil.run.
We weren't getting the krb5 configuration set in the environment because
we were overriding the environment to set the PATH.

ticket 136
2010-09-10 17:04:01 -04:00
Rob Crittenden
2e8bae590e Have certmonger track the initial Apache and 389-ds server certs.
We don't use certmonger to get certificates during installation because
of the chicken-and-egg problem. This means that the IPA web and ldap
certs aren't being tracked for renewal.

This requires some manual changes to the certmonger request files once
tracking has begun because it doesn't store a subject or principal template
when a cert is added via start-tracking.

This also required some changes to the cert command plugin to allow a
host to execute calls against its own service certs.

ticket 67
2010-09-09 16:38:45 -04:00
Rob Crittenden
d0ea0bb638 Changes to fix compatibility with Fedora 14
Fedora 14 introduced the following incompatiblities:
- the kerberos binaries moved from /usr/kerberos/[s]/bin to /usr/[s]bin
- the xmlrpclib in Python 2.7 is not fully backwards compatible to 2.6

Also, when moving the installed host service principals:
- don't assume that krbticketflags is set
- allow multiple values for krbextradata

ticket 155
2010-08-31 16:59:27 -04:00
Rob Crittenden
4b6b710ba6 Update command documentation based on feedback from docs team.
ticket #158
2010-08-27 13:31:04 -04:00
Rob Crittenden
110d46b792 Use global time and size limit values when searching.
Add test to verify that limit is honored and truncated flag set.

ticket #48
2010-08-19 10:51:55 -04:00
Rob Crittenden
e225ad4341 Add support for ldap:///self bind rules
This is added mainly so the self service rules can be updated without
resorting to ldapmodify.

ticket 80
2010-08-19 10:49:42 -04:00
Pavel Zuna
7a007d958b Fix Update function on details page.
The problem was that parameters with no values are automatically
set to None by the framework and it wasn't handled properly in
baseldap.py:get_attributes function. Also, there were two logical
bugs in details.js:
1) atttribute callback to update values were called for input elements
   instead of dt elements
2) it was always trying to update the primary key
2010-08-17 14:53:03 -04:00
Rob Crittenden
2f4f9054aa Enable a host to retrieve a keytab for all its services.
Using the host service principal one should be able to retrieve a keytab
for other services for the host using ipa-getkeytab. This required a number
of changes:

- allow hosts in the service's managedby to write krbPrincipalKey
- automatically add the host to managedby when a service is created
- fix ipa-getkeytab to return the entire prinicpal and not just the
  first data element. It was returning "host" from the service tgt
  and not host/ipa.example.com
- fix the display of the managedby attribute in the service plugin

This led to a number of changes in the service unit tests. I took the
opportunity to switch to the Declarative scheme and tripled the number
of tests we were doing. This shed some light on a few bugs in the plugin:

- if a service had a bad usercertificate it was impossible to delete the
  service. I made it a bit more flexible.
- I added a summary for the mod and find commands
- has_keytab wasn't being set in the find output

ticket 68
2010-08-16 17:13:56 -04:00
Rob Crittenden
1df10a88cd Add support for client failover to the ipa command-line.
This adds a new global option to the ipa command, -f/--no-fallback. If this
is included then just the server configured in /etc/ipa/default.conf is used.
Otherwise that is tried first then all servers in DNS with the ldap SRV record
are tried.

Create a new Local() Command class for local-only commands. The help
command is one of these. It shouldn't need a remote connection to execute.

ticket #15
2010-08-16 10:35:27 -04:00
Adam Young
3e6f0f5721 From: Pavel Zuna <pzuna@redhat.com>
Date: Tue, 10 Aug 2010 16:41:28 -0400
Subject: [PATCH 2/6] Add a new INTERNAL plugin that exports plugin meta-data into JSON.

This is required for the webUI, since we're dropping Genshi. *ehm* :)

You can't use this command on the CLI. It takes one optional argument:
the name of an IPA object. If not specified, meta-data for all objects
are returned.
2010-08-13 17:56:16 -04:00
Adam Young
030b5dab93 Change the behaviour of addattr/setattr parameters.
setattr and addattr can now be used both to set all values of
ANY attribute. the last setattr always resets the attribute to
the specified value and all addattr append to it.

Examples:
user-mod testuser --setattr=title=msc
  title: msc
user-mod testuser --setattr=title=msb
  title: msb
user-mod testuser --addattr=title=msc
  title: msb, msc
user-mod testuser --setattr=title=
  title:
user-mod testuser --setattr=title=msc --addattr=msb
  title: msc, msb
user-mod testuser --setattr=title=ing --addattr=bc
  title: ing, bc
user-mod testuser --setattr=title=doc
  title: doc

It's not very user friendly, but it's going to be used very very
rarely in special conditions in the CLI and we can use it to save
lots of JSON-RPC roundtrips in the webUI.

This version includes calling the validation of Params during the setting of the attrs.
2010-08-13 16:20:41 -04:00
Pavel Zuna
f15758dbea Improve serialization to JSON.
- Make it recursive.
- Make Param classes serializable.
- Take python native data types into account.
2010-08-12 09:06:22 -04:00
Pavel Zuna
cc9d0ffc67 Fix bug: not found exc. handler was failing for singleton objects 2010-08-12 09:03:36 -04:00
Pavel Zuna
6136f773a9 Add new parameters to LDAPSearch: timelimit and sizelimit. 2010-08-12 09:02:39 -04:00
Pavel Zuna
5797c8167a Make LDAPObject classes JSON serializable. 2010-08-12 09:01:56 -04:00
Rob Crittenden
5b894d1fb7 Allow decoupling of user-private groups.
To do this we need to break the link manually on both sides, the user and
the group.

We also have to verify in advance that the user performing this is allowed
to do both. Otherwise the user could be decoupled but not the group
leaving it in a quasi broken state that only ldapmodify could fix.

ticket 75
2010-08-10 16:41:47 -04:00
Rob Crittenden
8ad88b4119 Properly show the members when an add/remove operation fails.
The remove member function in baseldap was not returning failures at all.
The add member function was only showing them in the group object.

Most of the magic is handled in baseldap. Each plugin just needs to define
object_name and object_name_plural. object_name must be all lower-case
because fake-attributes are created so membership can be broken out
per-object type. I left the plural name lower case as well.

ticket 85
2010-08-06 15:34:09 -04:00