1. 08 Jul, 2019 1 commit
  2. 05 Jun, 2019 2 commits
    • chuck cranor's avatar
      two additional updates for EXPIRE_PASSWORDS=0 mode · ee6cf209
      chuck cranor authored
      1. In User.pm Create(), only apply the default expire time of 1 year
      to pswd_expires if EXPIRE_PASSWORDS is true.
      
      2. In tbacct's passwd command: the current behavior is that we set
      the pswd_expires time to "now" if we are changing the the password
      of someone else's account.   this patch adds a new "-e" flag that,
      if specified, uses the default expiration policy instead of now.
      The rational for this change is to allow scripts to import encrypted
      passwords from external account management systems and apply them
      to emulab using "tbacct passwd" without forcing an immediate change.
      ee6cf209
    • chuck cranor's avatar
      Allow Create() callers to specify the unix_uid of new accounts · 54cbaa77
      chuck cranor authored
      Modify the Create() call to allow unix_uids to be specified in the hash.
      If a unix_uid is provided in the hash, then we attempt to use that for
      the new account rather than using the "find unused numbers" sql query.
      If the given unix_uid is less than MIN_UNIX_UID or already in use then
      Create() will return undef.
      
      If no unix_uid is specified then there is no change in Create() behavior,
      so this will not impact any of the code currently in the tree.  The
      intent of this change is to allow Emulab admins the option of managing
      their accounts using data that is external to Emulab so you could have
      scripts that sync the list of active users to an external password file,
      LDAP server, etc.  (For this to work, it will also require a way to turn
      off Emulab's builtin account creation tool and Emulab's sql schema may
      need to be modified to handle larger unix_uids -- current limit is
      smallint(5)).
      54cbaa77
  3. 23 May, 2019 1 commit
    • Leigh Stoller's avatar
      Changed related to parameter sets and experiment bindings: · 03e4d8bc
      Leigh Stoller authored
      * Show the parameter bindings on the status page for an experiment, and
        on the memlane page. This is strictly informational so that users can
        quickly see the parameters that are/were chosen at the time the
        experiment was created.
      
      * Add a Save Parameters button on the memlane and status pages. This
        will generate a json structure and store it in the DB for that profile
        and user. Optionally, mark the parameter set as specific to a profile
        version or repo hash, so a user can quickly link to that version/hash
        and apply the parameter set.
      
      * On the instantiate page, the parameters step include new buttons to
        1) reset the form to default, 2) apply the parameters used in the most
        recent experiment (current, then history), 3) choose from a dropdown
        of parameters the users has saved for that profile, and 4) take the
        user to their activation history for the profile, to pick one to run
        again or save parameters.
      
      * Add a new tab to the user dashboard to show the user's saved parameter
        sets.
      
      * Lots of changes to the new version of the ppwizard for apply
        parameter sets and showing warnings about them. This code has NOT been
        applied to the old ppwizard.
      03e4d8bc
  4. 04 Jun, 2018 1 commit
    • David Johnson's avatar
      Docker server-side core, esp new libimageops support for Docker images. · 66366489
      David Johnson authored
      The docker VM server-side goo is mostly identical to Xen, with slightly
      different handling for parent images.  We also support loading external
      Docker images (i.e. those without a real imageid in our DB; in that
      case, user has to set a specific stub image, and some extra per-vnode
      metadata (a URI that points to a Docker registry/image repo/tag);
      the Docker clientside handles the rest.
      
      Emulab Docker images map to a Emulab imageid:version pretty seamlessly.
      For instance, the Emulab `emulab-ops/docker-foo-bar:1` image would map
      to `<local-registry-URI>/emulab-ops/emulab-ops/docker-foo-bar:1`; the
      mapping is `<local-registry-URI>/pid/gid/imagename:version`.  Docker
      repository names are lowercase-only, so we handle that for the user; but
      I would prefer that users use lowercase Emulab imagenames for all Docker
      images; that will help us.  That is not enforced in the code; it will
      appear in the documentation, and we'll see.
      
      Full Docker imaging relies on several other libraries
      (https://gitlab.flux.utah.edu/emulab/pydockerauth,
      https://gitlab.flux.utah.edu/emulab/docker-registry-py).  Each
      Emulab-based cluster must currently run its own private registry to
      support image loading/capture (note however that if capture is
      unnecessary, users can use the external images path instead).  The
      pydockerauth library is a JWT token server that runs out of boss's
      Apache and implements authn/authz for the per-Emulab Docker registry
      (probably running on ops, but could be anywhere) that stores images and
      arbitrates upload/download access.  For instance, nodes in an experiment
      securely pull images using their pid/eid eventkey; and the pydockerauth
      emulab authz module knows what images the node is allowed to pull
      (i.e. sched_reloads, the current image the node is running, etc).  Real
      users can also pull images via user/pass, or bogus user/pass + Emulab
      SSL cert.  GENI credential-based authn/z was way too much work, sadly.
      There are other auth/z paths (i.e. for admins, temp tokens for secure
      operations) as well.
      
      As far as Docker image distribution in the federation, we use the same
      model as for regular ndz images.  Remote images are pulled in to the
      local cluster's Docker registry on-demand from their source cluster via
      admin token auth (note that all clusters in the federation have
      read-only access to the entire registries of any other cluster in the
      federation, so they can pull images).  Emulab imageid handling is the
      same as the existing ndz case.  For instance, image versions are lazily
      imported, on-demand; local version numbers may not match the remote
      image source cluster's version numbers.  This will potentially be a
      bigger problem in the Docker universe; Docker users expect to be able to
      reference any image version at any time anywhere.  But that is of course
      handleable with some ex post facto synchronization flag day, at least
      for the Docker images.
      
      The big new thing supporting native Docker image usage is the guts of a
      refactor of the utils/image* scripts into a new library, libimageops;
      this is necessary to support Docker images, which are stored in their
      own registry using their own custom protocols, so not amenable to our
      file-based storage.  Note: the utils/image* scripts currently call out
      to libimageops *only if* the image format is docker; all other images
      continue on the old paths in utils/image*, which all still remain
      intact, or minorly-changed to support libimageops.
      
      libimageops->New is the factory-style mechanism to get a libimageops
      that works for your image format or node type.  Once you have a
      libimageops instance, you can invoke normal image logical operations
      (CreateImage, ImageValidate, ImageRelease, et al).  I didn't do every
      single operation (for instance, I haven't yet dealt with image_import
      beyond essentially generalizing DownLoadImage by image format).
      Finally, each libimageops is stateless; another design would have been
      some statefulness for more complicated operations.   You will see that
      CreateImage, for instance, is written in a helper-subclass style that
      blurs some statefulness; however, it was the best match for the existing
      body of code.  We can revisit that later if the current argument-passing
      convention isn't loved.
      
      There are a couple outstanding issues.  Part of the security model here
      is that some utils/image* scripts are setuid, so direct libimageops
      library calls are not possible from a non-setuid context for some
      operations.  This is non-trivial to resolve, and might not be worthwhile
      to resolve any time soon.  Also, some of the scripts write meaningful,
      traditional content to stdout/stderr, and this creates a tension for
      direct library calls that is not entirely resolved yet.  Not hard, just
      only partly resolved.
      
      Note that tbsetup/libimageops_ndz.pm.in is still incomplete; it needs
      imagevalidate support.  Thus, I have not even featurized this yet; I
      will get to that as I have cycles.
      66366489
  5. 04 Oct, 2017 1 commit
  6. 19 Apr, 2017 1 commit
    • Leigh Stoller's avatar
      Add support for user session tracking and Google Analytics. · a896be22
      Leigh Stoller authored
      If we assign a unique constant random value to every user, and spit that
      out in the initial ga() stuff at the beginning of each page load, google
      can combine interactions from the same user across different devices.
      Say, like work vs home computer.
      a896be22
  7. 17 Apr, 2017 1 commit
  8. 03 Mar, 2017 1 commit
  9. 23 Jan, 2017 1 commit
  10. 09 Nov, 2016 1 commit
  11. 03 Nov, 2016 1 commit
  12. 29 Aug, 2016 1 commit
    • Leigh Stoller's avatar
      Various fixes to deactivate/reactivate code, mostly to deal with not · bf77e242
      Leigh Stoller authored
      wanting to call setgroups cause it is so slow. also refactor the code to
      chown/chgrp user dot files so we can call it from reactivate.
      
      Refactor the code that bumps user/project activity and calls exports
      setup so that we can call it from reactivate.
      
      When deleting a ZFS home/proj directory, do the ZFS rename and then
      set the mountpoint=none, no need to have it mounted.
      bf77e242
  13. 24 Jun, 2016 1 commit
    • Leigh Stoller's avatar
      Change "genesis" to "portal" what the hell was I thinking when I · 040ea3be
      Leigh Stoller authored
      picked genesis. But this change actually has content; we need to
      distinguish between classic projects and emulab portal projects
      (new projects created via the portal, and used via the portal).  For now
      these are distinct until we decide to bring everyone up to the new
      interface.
      040ea3be
  14. 25 May, 2016 1 commit
  15. 18 Mar, 2016 1 commit
  16. 22 Feb, 2016 1 commit
  17. 08 Dec, 2015 1 commit
    • Kirk Webb's avatar
      Batch of changes that creates a PhantomNet portal branding. · ba49a457
      Kirk Webb authored
      Also includes some PhantomNet-specific restrictions (e.g. only
      allows use of the main Utah Emulab testbed  aggregate).
      
      This excercise stretched the limits of what we can reasonably do
      before introducing real per-testbed branding/policy mechanisms to
      the php/web front-end.  My changes ain't exactly pretty...
      
      Please take care when adding any testbed-specific changes to the
      code.  There are three flavors now to consider in the logic.
      ba49a457
  18. 02 Dec, 2015 1 commit
  19. 04 Nov, 2015 1 commit
    • Leigh Stoller's avatar
      Changes for Keith to develop the new profile picker: · eafff053
      Leigh Stoller authored
      1. Instead of a plain list of profiles, generate a more detailed list that
         includes last used and usage counts and project name and favorite flag,
         so that the new picker can be sorted/grouped.
      
         This list is *ordered* by most recent usage (if a real user), or most
         popular (if a guest). 
      
      2. Move the modal from quickvm_sup to the template, and generate the
         current list from the new json info.
      
      3. Add new table apt_profile_favorites to record favorite profiles for
         users.
      
      4. Add new ajax calls for above, MarkFavorite and ClearFavorite that take a
         single argument, the uuid of the profile. There is no UI for this, Keith
         is going to add that.
      eafff053
  20. 24 Mar, 2015 1 commit
  21. 25 Feb, 2015 1 commit
  22. 27 Jan, 2015 1 commit
  23. 09 Jan, 2015 1 commit
  24. 03 Jan, 2015 1 commit
  25. 14 Dec, 2014 1 commit
  26. 27 Oct, 2014 1 commit
    • Leigh Stoller's avatar
      Add methods to check for user having a valid encrypted ssl certificate, · e0d59dde
      Leigh Stoller authored
      and to generate one. When generating one, look for a revoked/expired
      certificate and reuse the key (and password) otherwise generate a new
      key and new random password. This allows existing Emulab users who have
      never used Geni, to use the APT/Cloud interface without having to create
      a key via the web interface.
      e0d59dde
  27. 25 Sep, 2014 1 commit
  28. 15 Sep, 2014 1 commit
  29. 27 Aug, 2014 1 commit
    • Leigh Stoller's avatar
      Large set of changes for using the Geni trusted signer tool, to · 980f6cbd
      Leigh Stoller authored
      authenticate Geni users to CloudLab (who do not have Emulab accounts).
      CloudLab users must have an account to do anything (unlike APT which allows
      guest users). But instead of requiring them to go through the Emulab
      account creation (high bar), let then use their Geni credentials to prove
      who they are. We then build a local account for that new user, and save off
      the speaksfor credential so that we can act on their behalf when talking to
      the backend clusters (and their MA to get their ssh keys).
      
      These users do not have a local account password, so they cannot log into
      the web interface using the Emulab login page, nor do they have a shell on
      ops.
      
      Once authenticated, we put the appropriate cookies into the browser via
      javascript, so they can use the Cloud (okay, APT) web interface (they
      appear logged in).
      
      I make use of the nonlocal_id field of the users table, which was not being
      used for anything else. Officially, these are "nonlocal" users in the code
      (IsNonLocal()).
      
      When a nonlocal user instantiates a profile, we use their speaksfor
      credential to ask their home MA for their ssh keys, which we then store in
      the DB, and then provide to the aggregate via the CreateSliver call.
      Note that no provision has been made for users who edit their profile and
      add keys; I am not currently expecting these users to stumble into the web
      interface (yet).
      980f6cbd
  30. 24 Jan, 2014 1 commit
  31. 17 Jan, 2014 1 commit
  32. 08 Mar, 2013 1 commit
  33. 14 Feb, 2013 1 commit
  34. 02 Jan, 2013 1 commit
  35. 24 Sep, 2012 1 commit
    • Eric Eide's avatar
      Replace license symbols with {{{ }}}-enclosed license blocks. · 6df609a9
      Eric Eide authored
      This commit is intended to makes the license status of Emulab and
      ProtoGENI source files more clear.  It replaces license symbols like
      "EMULAB-COPYRIGHT" and "GENIPUBLIC-COPYRIGHT" with {{{ }}}-delimited
      blocks that contain actual license statements.
      
      This change was driven by the fact that today, most people acquire and
      track Emulab and ProtoGENI sources via git.
      
      Before the Emulab source code was kept in git, the Flux Research Group
      at the University of Utah would roll distributions by making tar
      files.  As part of that process, the Flux Group would replace the
      license symbols in the source files with actual license statements.
      
      When the Flux Group moved to git, people outside of the group started
      to see the source files with the "unexpanded" symbols.  This meant
      that people acquired source files without actual license statements in
      them.  All the relevant files had Utah *copyright* statements in them,
      but without the expanded *license* statements, the licensing status of
      the source files was unclear.
      
      This commit is intended to clear up that confusion.
      
      Most Utah-copyrighted files in the Emulab source tree are distributed
      under the terms of the Affero GNU General Public License, version 3
      (AGPLv3).
      
      Most Utah-copyrighted files related to ProtoGENI are distributed under
      the terms of the GENI Public License, which is a BSD-like open-source
      license.
      
      Some Utah-copyrighted files in the Emulab source tree are distributed
      under the terms of the GNU Lesser General Public License, version 2.1
      (LGPL).
      6df609a9
  36. 30 Apr, 2012 1 commit
  37. 15 Mar, 2012 1 commit
  38. 30 Jan, 2012 2 commits
    • Leigh Stoller's avatar
      Changes to make it easier for ProtoGeni users! · 3dac3cb8
      Leigh Stoller authored
      * When generating an encrypted SSL certificate, derive an SSH public
        key from the private key and store in the pubkeys table for the
        user. Note that SSH version 2 RSA keys are actually just openssl RSA
        keys, and that ssh-keygen can extract an ssh compatible public key
        from it.
      
      * Change getsslcert.php3 to return the ssh private and public key when
        give the "ssh" boolean argument. This is mostly for the benefit of
        Flack; we probably need a better UI for the user to get this stuff. 
      
      * Remove the requirement that users must upload an SSH key to use
        protogeni, since we now create one for them when they create their
        encrypted SSL certificate.
      
      * Some cleanup; instead of looking at the comment field to determine
        what pubkeys are Emulab created (and should not be deleted), use new
        internal and nodelete flags.
      3dac3cb8
    • Leigh Stoller's avatar