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>
17 {% for message in messages %}
18 <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
23 <div class="col-md-12">
24 <ul class="nav nav-tabs nav-section">
25 <li class="active"><a href="#profile">User Profile</a></li>
26 <li><a href="#account">Account</a></li>
27 <li><a href="#access">Testbed Access</a></li>
31 <div class="tab-content">
32 <div class="tab-pane active row" id="profile">
34 <div class="col-md-12">
36 <form id="editForm" method="post" action="account_process" enctype="multipart/form-data">
38 <table class="profile">
41 <div><h3>Platform: Myslice</h3></div>
45 <td class="key">Email</td>
47 <span id="emailval" class="value" >{{ person.email }}</span>
48 <button class="btn btn-default" type="button" id="edit_email" onclick="editAlert();" title="To change your affiliation please contact the administrator">
49 <span class="glyphicon glyphicon-question-sign"></span> Edit
54 <td class="key">Password</td>
56 <button class="btn btn-default btn-xs" type="button" title="Password" name="edit_pass" id="edit_pass">
57 <span class="glyphicon glyphicon-edit"></span> Edit
59 <span id="passval"class="value">******** </span>
60 <span class="hide_this" id="span_pass">
61 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_pass_change"> Cancel </button>
62 <div style='display:none;' id="pass_form">
63 <input type='hidden' value='' /></div>
64 <table id="edit_password">
66 <td>Enter password: </td>
67 <td class="field"> <input type="password" name="password" id="password" /> </td>
70 <td>Confirm password: </td>
72 <input type="password" name="confirmpassword" id="confirmpassword" />
73 <input type="submit" class="btn btn-default btn-xs" name="submit_pass" value="Save"/>
81 <td class="key">Full Name</td>
83 <span id="nameval" class="value" >{{ fullname }} </span>
84 <span class="hide_this" id="span_name">
85 <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_name_change"> Cancel </button>
86 <div style='display:none;'><input type='hidden' name='nameform' /></div>
87 <input id="fname" type="text" name="fname" class="required" maxlength="200" value="{{firstname}}" />
88 <input id="lname" type="text" name="lname" class="required" maxlength="200" value="{{lastname}}" />
89 <input type="submit" class="btn btn-default btn-xs" name="submit_name" value="Save"/>
91 <button class="btn btn-default btn-xs" type="button"title="Full Name" id="edit_name">
92 <span class="glyphicon glyphicon-edit"></span> Edit
97 <td class="key">Authority</td>
99 <span id="affval" class="value">{{ authority }}</span>
100 <button class="btn btn-default btn-xs" type="button" id="edit_auth" onclick="editAlert()" title="To change your authority please contact the administrator">
101 <span class="glyphicon glyphicon-question-sign"></span> Edit
105 {%if 'Enabled' in user_status %}
107 <td class="key">Generate Keys</td>
109 <input type="submit" name="generate" class="btn btn-primary" value="Generate a new Key Pair" id="generate_keypair"
110 onclick="return confirm('Are you sure? If you do so, your current credentials will be overwritten.');"
111 title="It will generate a new key Pair and your current credentials will be overwritten."/>
115 <td class="key">Public Key</td>
117 <span id="keyval" class="value">******** </span>
118 <span class="hide_this" id="span_upload">
119 <button type="button" class="btn btn-default" title="Cancel" id="cancel_upload"> Cancel </button>
120 <div style='display:none;'>
121 <input type='hidden' name='upload' /></div>
122 <input type="file" name="pubkey" class="required" id="pubkey"/>
123 <input class="btn btn-default btn-xs" name="upload_key" id="upload_key" type="submit" title="Upload your public key" value="Upload"
124 onclick="return confirm('Are you sure? It will overwrite your current credentials and you have delegate it manually.');"/>
126 <div style='display:none;'> <input type='hidden' name='dload' /> </div>
127 <button type="submit" name="dl_pubkey" class="btn btn-default btn-xs" title="Download your public key" id="dl_file">
128 <span class="glyphicon glyphicon-download"></span> Download
130 <button class="btn btn-default btn-xs" id="upload_file" type="button" title="Upload a public key">
131 <span class="glyphicon glyphicon-upload"></span> Upload
135 <tr class="even" id="pkey_row">
136 {%if 'N/A' not in user_private_key%}
137 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
138 <td class="value">********<a href="#"></a>
139 <button type="submit" name="dl_pkey" class="btn btn-default" title="Download your privaye key" id="dl_pkey">
140 <span class="glyphicon glyphicon-download"></span> Download
142 <input class="btn btn-danger btn-xs" id="delete" name="delete" type="submit" value="Delete" title="Delete your private key"
143 onclick="return confirm('Are you sure? If you do so, you have to delegate your credentials manually.');"/>
146 <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
147 <td class="value">********<a href="#"></a>
148 <button type="submit" name="dl_pkey" class="btn btn-default disabled" title="Download your privaye key" id="dl_pkey">
149 <span class="glyphicon glyphicon-download"></span> Download
151 <input class="btn btn-danger btn-xs disabled" id="delete" name="delete" type="submit" title="Delete your private key" value="Delete" />
158 <a href="#" style="color:green" data-toggle="modal" data-target="#tradeoffmodal">Automatic vs. Manual delegation of credentials:</a>
159 Trade-off between ease-of-use & security</p>
169 <div class="tab-pane row" id="account">
170 <div class="col-md-12">
172 <h3>Principal Account <small>Account used for delegating credentials</small></h3>
173 <table class="table">
176 <th>Account Type</th>
177 <th>Account Delegation</th>
180 <!--<th>Pub Key</th> -->
182 {% for row in principal_acc %}
183 <tr class="border_bottom">
184 <td class="odd"> {{ row.platform_name }} </td>
185 <td class="odd"> {{ row.account_type }} </td>
186 <td class="odd"> {{ row.delegation_type }} </td>
187 <td class="odd"> {{ row.usr_hrn }} </td>
188 <td class="odd"> {{ row.user_status }} </td>
189 <!-- <td class="even"> {{ row.usr_pubkey }} </td> -->
197 {%if 'Enabled' in user_status %}
198 <div class="col-md-12">
199 <h3>Credentials <small>Delegated to Principal Account</small></h3>
200 <table class="table">
201 <caption><b>Delegated User Credential</b></caption>
203 <th>Expiration Date</th>
206 {% for row in my_users %}
207 <tr class="border_bottom">
208 <td class="odd"> {{ row.cred_exp }} </td>
210 <button class="btn btn-default btn-xs" name= "dl_user_cred" type="submit" title="Download User Credential">
211 <span class="glyphicon glyphicon-download"></span> Credential
213 <button class="btn btn-default btn-xs" name= "dl_user_cert" type="submit" title="Download User Certificate">
214 <span class="glyphicon glyphicon-download"></span> Certificate
216 <button class="btn btn-default btn-xs" name= "dl_user_p12" type="submit" title="Download User PKCS12">
217 <span class="glyphicon glyphicon-download"></span> PKCS p12
224 <table class="mytable table table-bordered table-hover">
225 <caption><b>Delegated Slice Credentials</b></caption>
228 <th>Expiration Date</th>
231 {% for row in my_slices %}
232 <tr class="border_bottom">
233 <td class="odd"> {{ row.slice_name }} </td>
234 <td class="odd"> {{ row.cred_exp }} </td>
236 <button class="btn btn-default btn-xs" name= "dl_{{row.slice_name}}" type="submit" title="Download Slice Credentials">
237 <span class="glyphicon glyphicon-download"></span> Download
244 <table class="mytable table table-bordered table-hover">
245 <caption><b>Delegated Authority Credentials</b></caption>
247 <th>Authority Name</th>
248 <th>Expiration Date</th>
251 {% for row in my_auths %}
252 <tr class="border_bottom">
253 <td class="odd"> {{ row.auth_name }} </td>
254 <td class="odd"> {{ row.cred_exp }} </td>
256 <button class="btn btn-default btn-xs" name= "dl_{{row.auth_name}}" type="submit" title="Download Authority Credentials">
257 <span class="glyphicon glyphicon-download"></span> Download
264 {%if '' not in my_users%}
265 <p><button class="btn btn-danger btn-lg btn-block" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
267 <p><button class="btn btn-danger btn-lg btn-block disabled" name= "clear_cred" type="submit" title="Clear All Credentials">Clear Credentials</button></p>
271 <!-- Modal- No credentials -->
272 <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
273 <div class="modal-dialog">
274 <div class="modal-content">
275 <div class="modal-header">
276 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
277 <h4 class="modal-title" id="myModalLabel">No credentials are delegated to the portal</h4>
279 <div class="modal-body" style="text-align:justify;">
280 <p>You are getting this message for any of the following reasons:</p>
282 <li>If your account is still pending for validation</li>
283 <li>If you press the "Clear Credentials" button</li>
284 <li>If you "Generate a new key pair"</li>
285 <li>If a new slice is added to your account</li>
287 <p>Unless your account has not yet been validated, it is sufficient to refresh the page or go back to the home page.
288 The portal will then regenerate your credentials. In some cases it may take more time than usual. If nothing works,
289 then please logout and login back into to the portal.
291 <h3>Manual delegation of credentials</h3>
293 You have selected upon sign-up to upload your public key. As you have uploaded your own public key,
294 the portal can no longer generate your credentials automatically. In order to have your credentials
295 delegated to the portal, please follow these instructions:
298 <li>Your account must first be validated by the manager of your organization.</li>
299 <li>In order for the portal to contact testbeds on your behalf, so as to list and reserve resources, you will need to
300 <a href="/portal/manual_delegation" target="_blank">delegate your credentials to the portal.</a></li>
303 <h3>Contact support</h3>
304 <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>
306 <div class="modal-footer">
307 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
314 <!-- Modal- Trade-off Message -->
315 <div class="modal fade" id="tradeoffmodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
316 <div class="modal-dialog">
317 <div class="modal-content">
318 <div class="modal-header">
319 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
320 <h4 class="modal-title" id="myModalLabel">
321 Automatic vs. Manual delegation of credentials
324 <div class="modal-body" style="text-align:justify;">
325 <h3>Automatic delegation of credentials</h3>
326 <p>Don't delete private key, ease-of-use option:</p>
329 This means that you will keep your private key in the portal and it will automatically delegate your credentials on your behalf.
332 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
333 will be available to you and the OneLab admins only.
336 <h3>Manual delegation of credentials</h3>
337 <p>Download & Delete private key, higher security option:</p>
339 <li>If you delete your private key, you will have more security but the portal will no longer be able to delegate credentials
340 on your behalf, and you will have to manually
341 <a href="/portal/manual_delegation" target="_blank">delegate your credentials to the portal.</a>
344 <h3>Contact support</h3>
345 <p>For more information, please <a href="/contact/" target="_blank">contact us</a>.</p>
347 <div class="modal-footer">
348 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
356 <div class="tab-pane row" id="access">
357 <div class="col-md-12">
359 <h3>Testbed Access <small>Reference Accounts in the following testbeds</small></h3>
360 <table class="mytable table table-bordered table-hover">
363 <th>Account Type</th>
364 <th>Reference to</th>
365 <th>Remove Account</th>
367 {% for row in ref_acc %}
368 <tr class="border_bottom">
369 <td class="odd"> {{ row.platform_name }} </td>
370 <td class="odd"> {{ row.account_type }} </td>
371 <td class="odd"> {{ row.account_reference }} </td>
373 <button class="btn btn-danger" name="delete_{{row.platform_name}}" type="submit" title="Delete account from this platform">
374 <span class="glyphicon glyphicon-minus"></span>
382 <h3>Add reference account to the following testbeds</h3>
383 <table class="mytable table table-bordered table-hover">
388 {% for platform in platform_list %}
389 <tr class="border_bottom">
390 <td class="odd"> {{ platform.platform_no_access }} </td>
392 <button class="btn btn-success btn-sm" name= "add_{{platform.platform_no_access}}" type="submit" title="Add account to this platform">
393 <span class="glyphicon glyphicon-plus"></span>
406 $(document).ready(function() {
407 $('.nav-tabs a').click(function (e) {
410 id = $(this).attr('href').substr(1);
414 $('button#createslice').click(function() {
415 window.location="/portal/slice_request/";