LDAP integration: change name/email/password/keys -- Guilherme Iecker
authorRezende & Pedro & Carlos & Raphael <rezende@land.ufrj.br>
Tue, 14 Jul 2015 18:17:30 +0000 (15:17 -0300)
committerRezende & Pedro & Carlos & Raphael <rezende@land.ufrj.br>
Tue, 14 Jul 2015 18:17:30 +0000 (15:17 -0300)
portal/actions.py
portal/homeview.py
portal/lsapiclient.py
portal/templates/fibre/fibre_institution.html
portal/templates/fibre/fibre_registration_view.html
portal/templates/fibre/fibre_termsview.html

index c7ed62b..eb46bee 100644 (file)
@@ -752,7 +752,7 @@ def manifold_add_reference_user_accounts(wsgi_request, request):
         }
         manifold_add_account(wsgi_request, manifold_account_params)
 
-def sfa_create_user(wsgi_request, request, namespace = None, as_admin = False):
+def sfa_create_user(wsgi_request, request, namespace = None, as_admin = True):
     """
     Arguments:
         wsgi_request (~ WSGIRequest) : 
@@ -783,6 +783,13 @@ def sfa_create_user(wsgi_request, request, namespace = None, as_admin = False):
     #query = Query.create('user').set(sfa_user_params).select('user_hrn')
     #results = execute_query(wsgi_request, query)
 
+    ###### Guilherme 08-07-2015
+    ##subject = 'Teste das chaves publicas'
+    ##message = 'Um novo usuario SFA esta sendo criado\n'
+    ##message += "request['public_key']: " + request['public_key'] + '\n'
+    ##message += "sfa_user_params['keys']: " + sfa_user_params['keys'] + '\n'
+    ##send_mail(subject, message, 'support@fibre.org.br', [request['email']], fail_silently=False)
+
     if namespace is not None:
         query = Query.create('%s:user' % namespace).set(sfa_user_params).select('user_hrn')
     else:
index cf3fcba..6c5ee9a 100644 (file)
@@ -64,8 +64,8 @@ class HomeView (FreeAccessView, ThemeView):
        #################################################
        ## first you must open a connection to the server
        try:
-               # Connect to NOC
-               l = ldap.initialize("ldap://10.128.0.50:389")
+               # Connect to UFRJ
+                l = ldap.initialize("ldap://200.130.15.186:389")
                # Bind/authenticate with a root user to search all objects
                l.simple_bind_s("cn=Manager,dc=br,dc=fibre","fibre2013")
                
@@ -316,8 +316,9 @@ class HomeView (FreeAccessView, ThemeView):
         else:
             # log user activity
             #activity.user.login(self.request, "error")
-            env['state'] = "Your username and/or password were incorrect."
-            
+
+           env['state'] = "Your username and/or password were incorrect."
+
             return render_to_response(self.template, env, context_instance=RequestContext(request))
 
     def get (self, request, state=None):
index 23584ab..c99ecae 100644 (file)
@@ -16,7 +16,9 @@ class LaboraSchedulerClient:
                      'get_user_id_by_username', 'add_user_public_key', 'delete_user_public_key' ]
 
     def __init__ ( self, organization ):
-       self.url, self.key = self.getOrganizationConfigs( organization )
+       #self.url, self.key = self.getOrganizationConfigs( organization )
+       self.url = "https://portal.ufrj.fibre.org.br:3002/LS-Sched/"
+       self.key = "9763dd03f2da8138fb22a63d78e5e9792b59a637"
 
     def __getattr__(self, name):
         
index 1d6cf97..b58f3c4 100644 (file)
@@ -6,32 +6,29 @@
 
 {% block content %}
 <div class="container">
-       <div class="row">
-               <div class="col-md-12">
-                        <div class="breadcrumbs">
-                                Management &nbsp;>&nbsp; Institution: <span id="authority_name"></span>
-                        </div>
-               </div>
-       </div>
+  <div class="row">
+    <div class="col-md-12">
+      <div class="breadcrumbs">
+        Management &nbsp;>&nbsp; Institution: <span id="authority_name"></span>
+      </div>
+    </div>
+  </div>
 </div>
+
 <div class="container">
-       <div class="row">
-               <div class="col-md-12">
-                       <ul class="nav nav-tabs nav-section">
-                               <!-- <li class="active"><a href="#about">About</a></li>-->
-                               <li class="active"><a href="#users">Users</a></li>
-                               <li><a href="#slices">Slices</a></li>
-                               <li><a href="#requests">Requests</a></li>
-                       </ul>
-           </div>
-       </div>
+  <div class="row">
+    <div class="col-md-12">
+      <ul class="nav nav-tabs nav-section">
+       <li class="active"><a href="#users">Users</a></li>
+       <li><a href="#slices">Slices</a></li>
+       <li><a href="#requests">Requests</a></li>
+      </ul>
+    </div>
+  </div>
 </div>
+
 <div class="container tab-content">
-<!--
-       <div class="tab-pane active row" id="about">
-       </div>
--->
-       <div class="tab-pane row" id="users" data-authority="{{user_details.parent_authority}}">
+       <div class="tab-pane active row" id="users" data-authority="{{user_details.parent_authority}}">
                <div class="col-md-12 el">
                        <div id="user-tab-loading"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
                                <div id="user-tab-loaded" style="display:none;">
index baa2e25..44b16a7 100644 (file)
                                        <br/>
                                                <a href="/portal/terms" target="_blank">[Printable format]</a>
                                                </p>
-                                       <h1 align="left">1 Context</h1>
-                                       <p align="left">
-                    The main goal of the FIBRE project is the design, implementation and validation of a shared Future Internet research facility, supporting the joint experimentation of European and Brazilian researchers. In order to achieve this goal the project will carry out four main activities:
+                   <p align="justify">
+                    By registering as a FIBRE-BR testbed user, experimenters shall be deemed to accept these conditions of use:
                     </p>
-                                       <p align="left">
-                    The development and operation of a new experimental facility in Brazil, including the setup of equipment to support experimentation with various technologies (fixed layer 2 and layer 3, wireless, optical) as well as the design and implementation of a control framework to automate the use and operation of the testbed.
-                    </p>
-                                       <p align="left">
-                    The development and operation of a Future Internet facility in Europe based on enhancements and the federation of two existing infrastructures: OFELIA and OneLab. Two OFELIA islands (i2CAT and University of Bristol (UNIVBRIS)) and the UTH's NITOS testbed will be enhanced by i) adding more physical resources (servers, OpenFlow-enabled switches and access points) to be able to cope with a bigger number ofusers and different use cases, ii) improving its respective control frameworks (based on the OFELIA control framework and OMF) and iii) adding more manpower to operate the facilities.
-                    </p>
-                                       <p align="left">
-                    The federation of the Brazilian and European experimental facilities, both at the physical connectivity and control framework level, to support the provisioning of slices using resources from both testbeds.
-                    </p>
-<h2>PROCEDURE OVERVIEW</h2>
-<p>If your institution is willing to join the FIBRE Consortium, you are kindly requested to follow the steps below:<br></p>
-<p>1. <a mce_href="http://www.fibre-ict.eu/images/stories/docs/fibre_mou_v0.3.doc" href="http://www.fibre-ict.eu/images/stories/docs/fibre_mou_v0.3.doc">Download the MoU model</a>  to understand the framework of collaboration between your institution and FIBRE project. The content of the MoU shall be discussed in case-by-case basis between the two parties.&nbsp;<span style="line-height: 1.3em;" mce_style="line-height: 1.3em;">&nbsp;</span></p>
-<p>2. Contact the Project office at <a href="mailto:info@fibre.org.br">info@fibre.org.br</a> to schedule a call to clarify all your questions concerning the duties, responsibilities and advantages of joining the FIBRE project.</p>
-<p>3. If your institution understand and agree on the commitment stated in the MoU, please submit the application by editing the <a href="http://www.fibre-ict.eu/images/fibre_mou_v0.2_ff.doc" mce_href="http://www.fibre-ict.eu/images/fibre_mou_v0.2_ff.doc" style="style" mce_style="style">MoU template</a> and sending it to 
- <a href="mailto:info@fibre.org.br">info@fibre.org.br</a></p>
-<p>4. Application Approval: the FIBRE General Assembly will decide based on the application and information gathered during the call. The approval process will normally take around one month.</p><p>5. By mutual agreement of both parties, MoU will be prepared and signed.</p>
-<p><span style="line-height: 1.3em;" mce_style="line-height: 1.3em;">6. Testbed usage / island installation: FIBRE will provide instructions and support to help your institution to carry out the activities described in the MoU.</span></p>
-<p><br></p>
-<p><span style="line-height: 1.3em;" mce_style="line-height: 1.3em;"><a mce_href="http://webconf2.rnp.br/p27egdf20y7/" href="http://webconf2.rnp.br/p27egdf20y7/">Watch the webconference meeting about the MoU details</a><br> (Held on 5/July 2013, in Portuguese)<br></span></p>
-<p><br></p>
+                   <ol style="text-align:justify">
+                                        <li>
+                        Users shall not use the testbed resources for any unlawful purpose and not (attempt to) breach or circumvent any administrative or security controls.
+                    </li><br/>
+                                        <li>
+                        Users shall respect intellectual property and confidentiality agreements.
+                    </li><br/>
+                                        <li>
+                        Users shall protect their access credentials (e.g. private keys or passwords).
+                    </li><br/>
+                                        <li>
+                        User access credentials will expire 1 year after your registration. Users can renew your registration at any time after the expiry date.
+                    </li><br/>
+                                        <li>
+                        Users shall immediately report any known or suspected security breach or misuse of the testbed or access credentials to FIBRE-BR´s Network Operation Centre (a.k.a. NOC).
+                    </li><br/>
+                                        <li>
+                        Users must notify the NOC of any changes to their Registration Information.
+                    </li><br/>
+                                        <li>
+                        Use of the testbed resources is at their own risk. The resources offered by each island are provided “as is”, with no guarantee that the testbed will be available at any time or that it will suit any purpose.
+                    </li><br/>
+                                        <li>
+                        Logged information, including information provided by users for registration purposes, is used for administrative, operational, accounting, monitoring and security purposes only. This information may be disclosed, via secured mechanisms, only for the same purposes and only as far as necessary to other organizations cooperating with the FIBRE-BR testbed. Although efforts are made to maintain confidentiality, no guarantees are given.
+                    </li><br/>
+                                        <li>
+                        The island administrators and resource providers are entitled to regulate, suspend or terminate users’ access, within their domain of authority, and users shall immediately comply with their instructions.
+                    </li><br/>
+                                        <li>
+                        Users are liable for the consequences of their violation of any of these conditions of use.
+                    </li><br/>
+                   </ol>
                                </div>
                                <div class="modal-footer">
                                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
index a82e2b1..7e866aa 100644 (file)
     Fibre: Future Internet testbeds experimentation between Brazil and Europe
     <br/>
 </p>
-<h2 align="left">Context</h2>
-                                       <p align="left">
-                    The main goal of the FIBRE project is the design, implementation and validation of a shared Future Internet research facility, supporting the joint experimentation of European and Brazilian researchers. In order to achieve this goal the project will carry out four main activities:
+                                       <p align="justify">
+                    By registering as a FIBRE-BR testbed user, experimenters shall be deemed to accept these conditions of use:
                     </p>
-                                       <p align="left">
-                    The development and operation of a new experimental facility in Brazil, including the setup of equipment to support experimentation with various technologies (fixed layer 2 and layer 3, wireless, optical) as well as the design and implementation of a control framework to automate the use and operation of the testbed.
-                    </p>
-                                       <p align="left">
-                    The development and operation of a Future Internet facility in Europe based on enhancements and the federation of two existing infrastructures: OFELIA and OneLab. Two OFELIA islands (i2CAT and University of Bristol (UNIVBRIS)) and the UTH's NITOS testbed will be enhanced by i) adding more physical resources (servers, OpenFlow-enabled switches and access points) to be able to cope with a bigger number ofusers and different use cases, ii) improving its respective control frameworks (based on the OFELIA control framework and OMF) and iii) adding more manpower to operate the facilities.
-                    </p>
-                                       <p align="left">
-                    The federation of the Brazilian and European experimental facilities, both at the physical connectivity and control framework level, to support the provisioning of slices using resources from both testbeds.
-                    </p>
-<h2>PROCEDURE OVERVIEW</h2>
-<p>If your institution is willing to join the FIBRE Consortium, you are kindly requested to follow the steps below:<br></p>
-<p>1. <a mce_href="http://www.fibre-ict.eu/images/stories/docs/fibre_mou_v0.3.doc" href="http://www.fibre-ict.eu/images/stories/docs/fibre_mou_v0.3.doc">Download the MoU model</a>  to understand the framework of collaboration between your institution and FIBRE project. The content of the MoU shall be discussed in case-by-case basis between the two parties.&nbsp;<span style="line-height: 1.3em;" mce_style="line-height: 1.3em;">&nbsp;</span></p>
-<p>2. Contact the Project office at <a href="mailto:info@fibre.org.br">info@fibre.org.br</a> to schedule a call to clarify all your questions concerning the duties, responsibilities and advantages of joining the FIBRE project.</p>
-<p>3. If your institution understand and agree on the commitment stated in the MoU, please submit the application by editing the <a href="http://www.fibre-ict.eu/images/fibre_mou_v0.2_ff.doc" mce_href="http://www.fibre-ict.eu/images/fibre_mou_v0.2_ff.doc" style="style" mce_style="style">MoU template</a> and sending it to 
- <a href="mailto:info@fibre.org.br">info@fibre.org.br</a></p>
-<p>4. Application Approval: the FIBRE General Assembly will decide based on the application and information gathered during the call. The approval process will normally take around one month.</p><p>5. By mutual agreement of both parties, MoU will be prepared and signed.</p>
-<p><span style="line-height: 1.3em;" mce_style="line-height: 1.3em;">6. Testbed usage / island installation: FIBRE will provide instructions and support to help your institution to carry out the activities described in the MoU.</span></p>
-<p><br></p>
-<p><span style="line-height: 1.3em;" mce_style="line-height: 1.3em;"><a mce_href="http://webconf2.rnp.br/p27egdf20y7/" href="http://webconf2.rnp.br/p27egdf20y7/">Watch the webconference meeting about the MoU details</a><br> (Held on 5/July 2013, in Portuguese)<br></span></p>
+                  <ol style="text-align:justify">
+                                       <li>
+                       Users shall not use the testbed resources for any unlawful purpose and not (attempt to) breach or circumvent any administrative or security controls.
+                    </li><br/>
+                                       <li>
+                       Users shall respect intellectual property and confidentiality agreements.
+                    </li><br/>
+                                       <li>
+                       Users shall protect their access credentials (e.g. private keys or passwords).
+                    </li><br/>
+                                       <li>
+                       User access credentials will expire 1 year after your registration. Users can renew your registration at any time after the expiry date.
+                   </li><br/>
+                                       <li>
+                       Users shall immediately report any known or suspected security breach or misuse of the testbed or access credentials to FIBRE-BR´s Network Operation Centre (a.k.a. NOC).
+                   </li><br/>
+                                       <li>
+                       Users must notify the NOC of any changes to their Registration Information.
+                    </li><br/>
+                                       <li>
+                       Use of the testbed resources is at their own risk. The resources offered by each island are provided “as is”, with no guarantee that the testbed will be available at any time or that it will suit any purpose.
+                    </li><br/>
+                                       <li>
+                       Logged information, including information provided by users for registration purposes, is used for administrative, operational, accounting, monitoring and security purposes only. This information may be disclosed, via secured mechanisms, only for the same purposes and only as far as necessary to other organizations cooperating with the FIBRE-BR testbed. Although efforts are made to maintain confidentiality, no guarantees are given.
+                    </li><br/>
+                                       <li>
+                       The island administrators and resource providers are entitled to regulate, suspend or terminate users’ access, within their domain of authority, and users shall immediately comply with their instructions.
+                    </li><br/>
+                                       <li>
+                       Users are liable for the consequences of their violation of any of these conditions of use.
+                    </li><br/>
+                  </ol>
+
 <p><br></p>
 <div>
     <div>