1 {% extends "layout.html" %}
5 <div class="col-md-12">
6 <div class="breadcrumbs">
7 Account > <a href="/account">{{ person.email }}</a>
10 {%if 'no_creds' in user_cred %}
11 <p class="command"><a href="#" style="color:red" data-toggle="modal" data-target="#myModal">NO CREDENTIALS</a> are delegated to the portal!</p>
13 {%if 'creds_expired' in user_cred %}
14 <p class="command"><a href="#" style="color:red" data-toggle="modal" data-target="#myModal">EXPIRED CREDENTIALS</a> Please delegate again your credentials to the portal!</p>
20 {% for message in messages %}
21 <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
26 <div class="col-md-12">
27 <ul class="nav nav-tabs nav-section">
28 <li class="active"><a href="#profile">User Profile</a></li>
29 <li><a href="#account">Account</a></li>
30 <li><a href="#access">Testbed Access</a></li>
34 <div class="tab-content">
35 <div class="tab-pane active row" id="profile">
37 <div class="col-md-12">
39 <form id="editForm" method="post" action="account_process" enctype="multipart/form-data">
41 <table class="profile">
44 <div><h3>Platform: Myslice</h3></div>
48 <td class="key">Email</td>
50 <span id="emailval" class="value" >{{ person.email }}</span>
51 <button class="btn btn-default" type="button" id="edit_email" onclick="editAlert();" title="To change your affiliation please contact the administrator">
52 <span class="glyphicon glyphicon-question-sign"></span> Edit
57 <td class="key">Password</td>
59 <button class="btn btn-default btn-xs" type="button" title="Password" name="edit_pass" id="edit_pass">
60 <span class="glyphicon glyphicon-edit"></span> Edit
62 <span id="passval"class="value">******** </span>
63 <span class="hide_this" id="span_pass">
64 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_pass_change"> Cancel </button>
65 <div style='display:none;' id="pass_form">
66 <input type='hidden' value='' /></div>
67 <table id="edit_password">
69 <td>Enter password: </td>
70 <td class="field"> <input type="password" name="password" id="password" /> </td>
73 <td>Confirm password: </td>
75 <input type="password" name="confirmpassword" id="confirmpassword" />
76 <input type="submit" class="btn btn-default btn-xs" name="submit_pass" value="Save"/>
84 <td class="key">Full Name</td>
86 <span id="nameval" class="value" >{{ fullname }} </span>
87 <span class="hide_this" id="span_name">
88 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_name_change"> Cancel </button>
89 <div style='display:none;'><input type='hidden' name='nameform' /></div>
90 <input id="fname" type="text" name="fname" class="required" maxlength="200" value="{{firstname}}" />
91 <input id="lname" type="text" name="lname" class="required" maxlength="200" value="{{lastname}}" />
92 <input type="submit" class="btn btn-default btn-xs" name="submit_name" value="Save"/>
94 <button class="btn btn-default btn-xs" type="button"title="Full Name" id="edit_name">
95 <span class="glyphicon glyphicon-edit"></span> Edit
100 <td class="key">Authority</td>
102 <span id="affval" class="value">{{ authority }}</span>
103 <button class="btn btn-default btn-xs" type="button" id="edit_auth" onclick="editAlert()" title="To change your authority please contact the administrator">
104 <span class="glyphicon glyphicon-question-sign"></span> Edit
108 {%if 'Enabled' in user_status %}
110 <td class="key">Generate Keys</td>
112 <input type="submit" name="generate" class="btn btn-primary" value="Generate a new Key Pair" id="generate_keypair"
113 onclick="return confirm('Are you sure? If you do so, your current credentials will be overwritten.');"
114 title="It will generate a new key Pair and your current credentials will be overwritten."/>
118 <td class="key">Public Key</td>
120 <span id="keyval" class="value">******** </span>
121 <span class="hide_this" id="span_upload">
122 <button type="button" class="btn btn-default" title="Cancel" id="cancel_upload"> Cancel </button>
123 <div style='display:none;'>
124 <input type='hidden' name='upload' /></div>
125 <input type="file" name="pubkey" class="required" id="pubkey"/>
126 <input class="btn btn-default btn-xs" name="upload_key" id="upload_key" type="submit" title="Upload your public key" value="Upload"
127 onclick="return confirm('Are you sure? It will overwrite your current credentials and you have delegate it manually.');"/>
129 <div style='display:none;'> <input type='hidden' name='dload' /> </div>
130 <button type="submit" name="dl_pubkey" class="btn btn-default btn-xs" title="Download your public key" id="dl_file">
131 <span class="glyphicon glyphicon-download"></span> Download
133 <button class="btn btn-default btn-xs" id="upload_file" type="button" title="Upload a public key">
134 <span class="glyphicon glyphicon-upload"></span> Upload
138 <tr class="even" id="pkey_row">
139 {%if 'N/A' not in user_private_key%}
140 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
141 <td class="value">********<a href="#"></a>
142 <button type="submit" name="dl_pkey" class="btn btn-default" title="Download your privaye key" id="dl_pkey">
143 <span class="glyphicon glyphicon-download"></span> Download
145 <input class="btn btn-danger btn-xs" id="delete" name="delete" type="submit" value="Delete" title="Delete your private key"
146 onclick="return confirm('Are you sure? If you do so, you have to delegate your credentials manually.');"/>
149 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
150 <td class="value">********<a href="#"></a>
151 <button type="submit" name="dl_pkey" class="btn btn-default disabled" title="Download your privaye key" id="dl_pkey">
152 <span class="glyphicon glyphicon-download"></span> Download
154 <input class="btn btn-danger btn-xs disabled" id="delete" name="delete" type="submit" title="Delete your private key" value="Delete" />
158 <tr class="even" id="sfi_config_row">
159 <td class="key">sfi_config </td>
160 <td class="value">use sfi_config file with sfi.py package (pip install sfa)<a href="#"></a>
161 <button type="submit" name="dl_sfi_config" class="btn btn-default btn-xs" title="Download your sfi_config" id="dl_sfi_config">
162 <span class="glyphicon glyphicon-download"></span> Download
167 {%if 'N/A' not in user_private_key%}
168 <td class="key">Identity</td>
170 <button type="submit" name="dl_identity" class="btn btn-default btn-xs" title="You will require it to use jfed" id="dl_identity">
171 <span class="glyphicon glyphicon-download"></span> Download
175 <td class="key">Identity</td>
177 <button type="submit" name="dl_identity" class="btn btn-default btn-xs disabled" title="You will require it to use jfed" id="dl_identity">
178 <span class="glyphicon glyphicon-download"></span> Download
187 <a href="#" style="color:green" data-toggle="modal" data-target="#tradeoffmodal">Automatic vs. Manual delegation of credentials:</a>
188 Trade-off between ease-of-use & security</p>
198 <div class="tab-pane row" id="account">
199 <div class="col-md-12">
201 <h3>Principal Account <small>Account used for delegating credentials</small></h3>
202 <table class="table">
205 <th>Account Type</th>
206 <th>Account Delegation</th>
209 <!--<th>Pub Key</th> -->
211 {% for row in principal_acc %}
212 <tr class="border_bottom">
213 <td class="odd"> {{ row.platform_name }} </td>
214 <td class="odd"> {{ row.account_type }} </td>
215 <td class="odd"> {{ row.delegation_type }} </td>
216 <td class="odd"> {{ row.usr_hrn }} </td>
217 <td class="odd"> {{ row.user_status }} </td>
218 <!-- <td class="even"> {{ row.usr_pubkey }} </td> -->
226 {%if 'Enabled' in user_status %}
227 <div class="col-md-12">
228 <h3>Credentials <small>Delegated to Principal Account</small></h3>
229 <table class="table">
230 <caption><b>Delegated User Credential</b></caption>
232 <th>Expiration Date</th>
235 {% for row in my_users %}
236 <tr class="border_bottom">
237 <td class="odd"> {{ row.cred_exp }} </td>
239 <button class="btn btn-default btn-xs" name= "dl_user_cred" type="submit" title="Download User Credential">
240 <span class="glyphicon glyphicon-download"></span> Credential
242 <button class="btn btn-default btn-xs" name= "dl_user_cert" type="submit" title="Download User Certificate">
243 <span class="glyphicon glyphicon-download"></span> Certificate
245 <button class="btn btn-default btn-xs" name= "dl_user_p12" type="submit" title="Download User PKCS12">
246 <span class="glyphicon glyphicon-download"></span> PKCS p12
253 <table class="mytable table table-bordered table-hover">
254 <caption><b>Delegated Slice Credentials</b></caption>
257 <th>Expiration Date</th>
260 {% for row in my_slices %}
261 <tr class="border_bottom">
262 <td class="odd"> {{ row.slice_name }} </td>
263 <td class="odd"> {{ row.cred_exp }} </td>
265 <button class="btn btn-default btn-xs" name= "dl_{{row.slice_name}}" type="submit" title="Download Slice Credentials">
266 <span class="glyphicon glyphicon-download"></span> Download
273 <table class="mytable table table-bordered table-hover">
274 <caption><b>Delegated Authority Credentials</b></caption>
276 <th>Authority Name</th>
277 <th>Expiration Date</th>
280 {% for row in my_auths %}
281 <tr class="border_bottom">
282 <td class="odd"> {{ row.auth_name }} </td>
283 <td class="odd"> {{ row.cred_exp }} </td>
285 <button class="btn btn-default btn-xs" name= "dl_{{row.auth_name}}" type="submit" title="Download Authority Credentials">
286 <span class="glyphicon glyphicon-download"></span> Download
293 {%if '' not in my_users%}
294 <p><button class="btn btn-danger btn-lg btn-block" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
296 <p><button class="btn btn-danger btn-lg btn-block disabled" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
300 <!-- Modal- No credentials -->
301 <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
302 <div class="modal-dialog">
303 <div class="modal-content">
304 <div class="modal-header">
305 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
306 <h4 class="modal-title" id="myModalLabel">No credentials are delegated to the portal</h4>
308 <div class="modal-body" style="text-align:justify;">
309 <p>You are getting this message for any of the following reasons:</p>
311 <li>If your account is still pending for validation</li>
312 <li>If you press the "Clear Credentials" button</li>
313 <li>If you "Generate a new key pair"</li>
314 <li>If a new slice is added to your account</li>
316 <p>Unless your account has not yet been validated, it is sufficient to refresh the page or go back to the home page.
317 The portal will then regenerate your credentials. In some cases it may take more time than usual. If nothing works,
318 then please logout and login back into to the portal.
320 <h3>Manual delegation of credentials</h3>
322 You have selected upon sign-up to upload your public key. As you have uploaded your own public key,
323 the portal can no longer generate your credentials automatically. In order to have your credentials
324 delegated to the portal, please follow these instructions:
327 <li>Your account must first be validated by the manager of your organization.</li>
328 <li>In order for the portal to contact testbeds on your behalf, so as to list and reserve resources, you will need to
329 <a href="/portal/manual_delegation" target="_blank">delegate your credentials to the portal.</a></li>
332 <h3>Contact support</h3>
333 <p>If you don't have the above mentioned cases and still have this message, please <a href="/contact/" target="_blank">contact us</a>.</p>
335 <div class="modal-footer">
336 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
343 <!-- Modal- Trade-off Message -->
344 <div class="modal fade" id="tradeoffmodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
345 <div class="modal-dialog">
346 <div class="modal-content">
347 <div class="modal-header">
348 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
349 <h4 class="modal-title" id="myModalLabel">
350 Automatic vs. Manual delegation of credentials
353 <div class="modal-body" style="text-align:justify;">
354 <h3>Automatic delegation of credentials</h3>
355 <p>Don't delete private key, ease-of-use option:</p>
358 This means that you will keep your private key in the portal and it will automatically delegate your credentials on your behalf.
361 This option does not provide as high of a level of security; however, your private key will still only be used in the portal and
362 will be available to you and the Fed4FIRE admins only.
365 <h3>Manual delegation of credentials</h3>
366 <p>Download & Delete private key, higher security option:</p>
368 <li>If you delete your private key, you will have more security but the portal will no longer be able to delegate credentials
369 on your behalf, and you will have to manually
370 <a href="/portal/manual_delegation" target="_blank">delegate your credentials to the portal.</a>
373 <h3>Contact support</h3>
374 <p>For more information, please <a href="/contact/" target="_blank">contact us</a>.</p>
376 <div class="modal-footer">
377 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
385 <div class="tab-pane row" id="access">
386 <div class="col-md-12">
388 <h3>Testbed Access <small>Reference Accounts in the following testbeds</small></h3>
389 <table class="mytable table table-bordered table-hover">
392 <th>Account Type</th>
393 <th>Reference to</th>
394 <th>Remove Account</th>
396 {% for row in ref_acc %}
397 <tr class="border_bottom">
398 <td class="odd"> {{ row.platform_name }} </td>
399 <td class="odd"> {{ row.account_type }} </td>
400 <td class="odd"> {{ row.account_reference }} </td>
402 <button class="btn btn-danger" name="delete_{{row.platform_name}}" type="submit" title="Delete account from this platform">
403 <span class="glyphicon glyphicon-minus"></span>
411 <h3>Add reference account to the following testbeds</h3>
412 <table class="mytable table table-bordered table-hover">
417 {% for platform in platform_list %}
418 <tr class="border_bottom">
419 <td class="odd"> {{ platform.platform_no_access }} </td>
421 <button class="btn btn-success btn-sm" name= "add_{{platform.platform_no_access}}" type="submit" title="Add account to this platform">
422 <span class="glyphicon glyphicon-plus"></span>
435 $(document).ready(function() {
436 $('.nav-tabs a').click(function (e) {
439 id = $(this).attr('href').substr(1);
443 $('button#createslice').click(function() {
444 window.location="/portal/slice_request/";