~ubuntu-branches/ubuntu/maverick/eucalyptus/maverick

« back to all changes in this revision

Viewing changes to clc/modules/msgs/src/main/java/edu/ucsb/eucalyptus/msgs/Users.groovy

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey)
  • Date: 2010-07-21 17:27:10 UTC
  • mfrom: (1.1.38 upstream)
  • Revision ID: james.westby@ubuntu.com-20100721172710-7xv07dmdqgivc3t9
Tags: 2.0~bzr1211-0ubuntu1
* New major upstream version merge, 2.0 (r1211).
* debian/patches/:
  - 01-wsdl-stubs.patch, debian/wsdl.md5sums: wsdl stubs updated.
  - 02-Makefile.patch: Updated to reflect new code layout.
  - 07-local_support_euca_conf-in.patch: Updated to reflect new code layout.
  - 08-ubuntu-default-networking.patch: Refreshed.
  - 09-small-128-192MB.patch: Updated to point to new location.
  - 10-disable-iscsi.patch: Refreshed.
  - 11-state-cleanup-memleakfix.patch: Removed, fixed upstream.
  - 15-fix-default-ramdisk.patch: Updated to point to new location.
  - 16-kvm_libvirt_xml_default_use_kvm.patch: Updated to reflect changes.
  - 17-fix_walrus_OOM_errors.patch: Removed, fixed upstream.
  - 18-priv_security.patch: Updated to reflect upstream changes.
  - 20-brute-force-webui.patch: Updated to reflect upstream changes. 
  - 21-eucalyptus-1.7-with-gwt-1.6.4.patch: New patch, allows 
    eucalyptus-1.7 to be built against gwt 1.6.4. Based on patch courtesy 
    of Dmitrii Zagorodnov, upstream. (LP: #597330)
* debian/eucalyptus-java-common.links: 
  - Changed symlink for groovy, point to groovy.all.jar, making compatiable 
    with groovy versions >1.7. (LP: #595421)
  - Added ant.jar & jetty-rewrite-handler.jar as they are now required.
* debian/control
  - & debian/build-jars: Added libjavassist-java and libjetty-extra-java as 
    build dependencies.
  - Added libjetty-extra-java as a dependency of eucalyptus-java-common
* The binary resulting jar's have been renamed from eucalyptus-*-1.6.2.jar
  to eucalyptus-*-main.jar:    
  - debian/eucalyptus-cc.upstart
  - debian/eucalyptus-cloud.install
  - debian/eucalyptus-common.eucalyptus.upstart
  - debian/eucalyptus-java-common.install
  - debian/eucalyptus-network.upstart
  - debian/eucalyptus-sc.install
  - debian/eucalyptus-walrus.install
* debian/eucalyptus-java-common.install: New upstream jars that have been
  installed:
  - eucalyptus-db-hsqldb-ext-main.jar
  - eucalyptus-component-main.jar
* debian/control:
  - Updated Standards Version to 3.8.4 (no change)
  - Updated the upstream Homepage to: http://open.eucalyptus.com/
  - Changed Vcs-Bzr to reflect new location of Ubuntu hosted development branch.
  - Made the Build Dependency of groovy and the binary eucalyptus-java-common
    package depend on version >=1.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package edu.ucsb.eucalyptus.msgs;
 
2
 
 
3
import java.security.cert.X509Certificate;
 
4
import java.util.ArrayList;
 
5
import com.eucalyptus.auth.principal.User;
 
6
import com.eucalyptus.auth.Groups;
 
7
 
 
8
public class UserInfoType extends EucalyptusData {
 
9
  String userName;
 
10
  String email;
 
11
  String accessKey;
 
12
  String secretKey;
 
13
  Boolean admin = Boolean.FALSE;
 
14
  Boolean enabled = Boolean.FALSE;
 
15
  String distinguishedName;
 
16
  String certificateSerial;
 
17
  String certificateCode;
 
18
  String confirmationCode;
 
19
  ArrayList<String> groups = new ArrayList<String>();
 
20
  ArrayList<String> revoked = new ArrayList<String>();
 
21
    
 
22
  public UserInfoType( User u, String email, String confirmationCode ) {
 
23
    this.userName = u.getName();
 
24
    this.accessKey = u.getQueryId();
 
25
    this.secretKey = u.getSecretKey();
 
26
    this.distinguishedName = u.getX509Certificate( )?.getSubjectX500Principal( )?.toString();
 
27
    this.certificateSerial = u.getX509Certificate( )?.getSerialNumber( );
 
28
    for( X509Certificate x : u.getAllX509Certificates() ) {
 
29
      if( !this.certificateSerial.equals(x.getSerialNumber().toString())) {
 
30
        this.revoked.add( x.getSerialNumber().toString() );
 
31
      }
 
32
    }
 
33
    for( Group g : Groups.lookupUserGroups( u ) ) {
 
34
      this.groups.add( g.getName() );
 
35
    }
 
36
    this.enabled = u.isEnabled( );
 
37
    this.admin = u.isAdministrator( );
 
38
    this.email = email;
 
39
    this.certificateCode = u.getToken();
 
40
    this.confirmationCode = confirmationCode;
 
41
  }
 
42
}  
 
43
public class GroupInfoType extends EucalyptusData {
 
44
  String groupName;
 
45
  ArrayList<String> users = new ArrayList<String>();
 
46
  ArrayList<String> authorizations = new ArrayList<String>();
 
47
  public GroupInfoType( String name ) {
 
48
    this.groupName = name;
 
49
  }
 
50
}
 
51
public class ManagementMessage extends EucalyptusMessage {}
 
52
public class UserManagementMessage extends ManagementMessage {}
 
53
 
 
54
public class DescribeUsersType extends UserManagementMessage {
 
55
  ArrayList<String> userNames = new ArrayList<String>();  
 
56
}
 
57
public class DescribeUsersResponseType extends UserManagementMessage {
 
58
  ArrayList<UserInfoType> users = new ArrayList<UserInfoType>();
 
59
}
 
60
public class AddUserType extends UserManagementMessage {
 
61
  String userName;
 
62
  Boolean admin;
 
63
  String email;
 
64
}
 
65
 
 
66
public class AddUserResponseType extends UserManagementMessage {}
 
67
public class DeleteUserType extends UserManagementMessage {
 
68
  String userName;
 
69
}
 
70
public class DeleteUserResponseType extends UserManagementMessage {}
 
71
 
 
72
 
 
73
public class GroupManagementMessage extends ManagementMessage  {}
 
74
public class DescribeGroupsType extends GroupManagementMessage {
 
75
  ArrayList<String> groupNames = new ArrayList<String>();  
 
76
}
 
77
public class DescribeGroupsResponseType extends GroupManagementMessage {
 
78
  ArrayList<GroupInfoType> groups = new ArrayList<GroupInfoType>();
 
79
}
 
80
public class AddGroupType extends GroupManagementMessage {
 
81
  String groupName;
 
82
}
 
83
public class AddGroupResponseType extends GroupManagementMessage {}
 
84
public class DeleteGroupType extends EucalyptusMessage {
 
85
  String groupName;
 
86
}
 
87
public class DeleteGroupResponseType extends GroupManagementMessage {}
 
88
public class AddGroupMemberType extends GroupManagementMessage {
 
89
  String groupName;
 
90
  String userName;
 
91
  Boolean admin;
 
92
}
 
93
public class AddGroupMemberResponseType extends GroupManagementMessage {}
 
94
public class DeleteGroupMemberType extends EucalyptusMessage {
 
95
  String groupName;
 
96
  String userName;
 
97
}
 
98
public class DeleteGroupMemberResponseType extends GroupManagementMessage {}
 
99
 
 
100
public class GrantGroupAdminType extends EucalyptusMessage {
 
101
  String groupName;
 
102
  String userName;
 
103
}
 
104
public class GrantGroupAdminResponseType extends GroupManagementMessage {}
 
105
public class RevokeGroupAdminType extends GroupManagementMessage {
 
106
  String groupName;
 
107
  String userName;
 
108
}
 
109
public class RevokeGroupAdminResponseType extends GroupManagementMessage {}
 
110
 
 
111
 
 
112