Skip to content

172 yml file keychain support

Closes #172 (closed) And goes hand in hand with https://code.chs.usgs.gov/ghsc/hazdev/cdk/anss-pdl/-/merge_requests/184

This change adds support for the use of a .yml file for the keychain.

The implementation is slightly odd because the class itself is based off of the Configurable interface to create objects using configure(Config config). In order to not refactor the entire Config class to support both yml and ini files, I only added this to the ProductKeyChain class.

When that class gets a file of type *.ini -> it does what it did before. When it gets a file of type *.yml -> it parses the yml and loads up the ProductKeys via a created Config object. This is unseen to the outside world so there is not real Config object for those keys, but to make the transformation they get created internal to that class so as long as a yml file in the form of this is given, it will create the necessary keys:

Example keychain file:

        "version": 1
        "keychain":
          "keyOne":
            "sources":
              - "ak"
            "types":
              - "origin"
              - "shakemap"
            "keys":
              - "ssh-dss AAAAB3NzaC1kc3MAAACBAIJAqyTLDw70cHcxl1yLoz+xoDosFHkxKUE1EgrsTjdabMA7UvA+sMu2waqiM9q065ZZoJkufratwkbF1dz8YVanUzjpSxwbKzBifAON6ZvDEX7jlsaOwi8L7GmTdqyw4KttuAp9LVIPLY2GzMLSJ61eHt1y5Fw6XfVwIT6OWqJLAAAAFQDA53I8cLfCHXW40XHFfiO6BI+lOwAAAIA/NsNxyBt0w7ZCZ9WvSrtevH1ygJVaE/K/UM8y6MbuxrhhfGjfLbO8zMHugRj/8ujqyCYCNPDsTQzrqPKBlMRvpwVlrxK19XVsDPPgS6yb73V1/0Y6oeUMUZ/nquJyuRhLVl63uAYOIGxiFzigWZKxruMK7RfpGzZenZYwWJYTrQAAAIBIShpmoWDYK7/EHIGLxFe2X6g2x5UwFrKW7iz8pONz7kPAEn9Psb2saUWh6WVv1VCr2RbVu5GZQ959F94n0eplz0EKBAhQsk+IJvN8kBmmRRL9yIikVL/FWPKrm4aaylpX1HIr6r3PoeNrFnG9eoCoOOr1YqWo57B9GlRnjVUvDw== PDLQuakeML"
              - "ssh-dss AAAAB3NzaC1kc3MAAACBAKSMROJq2lrVcFLNK9FvYJ97SKZBSMreJY2kk4mXVj7silXHiUUAefngj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SstLNMqF+ATfMpsXn7TBNRi ShakeMapPDL_AEIC_Backup"
              - "ssh-dss AAAAB3NzaC1kc3MAAACBAMpDzlvxFRAQSJscwmBPQW3vYy9gC+fqLnIFHszQf6HjgSSXY+WBYvsy83Mvaa04F0TzsuP5zZciJP+Wx1CksxEzMBGbh97zu+AG32tUmauuv+btT+Fmp4rJZXhmhOsAuCjaJezlJ9d4e7kIEFRUEzt0nR/AmgMgNAvCe6JsWSoTAAAAFQCWDTf9eUEObk+mE+OtAF9b7A7P0QAAAIBhjBjHBSAtwFp1xnh8ynJKgVHy+f51sHORwg+91SNEeNFGyiYHSgvXdGuxF55eNMAnYbU4v9U+Hb8NMkIbe+2fJ5/IBWqNR7Wy6e52q7tdH6fd5owoI+uM2P4w80WKt8orPX2CHM86KPvU35sreL46M1L16pxIsfaJfQ1CYXK2iwAAAIAhIbsSQkTraWxneGdBQdZoWQJQ3Z2sfEzqXdqDd/1o57X2DTfmCVQ6EGWIcNQsuBmxUx/OMfKicvr2KXsu/7GBuS5f0WaxuCxdefwZH97sDAGn+VS38lqZz1p5ScsiAaz7yEQZPKes4zj62h7Y4kxZCxETytTgBHxTuISwLPAuLA== key for AEC-USGS PDL submissions"

          "keyTwo":
            "types":
              - "instrument-quality"
            "keys":
              - "ssh-dss AAAAB3NzaC1kc3MAAACBAI+9gfRwMWE5rZZbF2u62p+h8AvgKY0OhElF77fv+Oua4gCsgV/jBxT8B9LZfnkoJolusrazpm8+HcVkDQQMXCmW6covw3ZHldRiVR+DLzN56YSqJXEXEhTcU6H4bV3iNe5ODQQtwqnF5Rlv8q29D1+G1LTONkeRZZZNtws0U0A3AAAAFQCgJEcuUHOlSv/tfKRo75836l08ywAAAIATeUCNTanMYMYvs3Zv0Nva7t4jZQU3SnAnNifG4GuBKqSEtiuejL0o7PwT8w5llu8z669YfoaDbvHgC5WsRBwW5YooTzXEDeseABYDSwRkzf3Sa9v5h5deutw55liV/+Ov7DDZGAwT5FniXW3LKYzl5lwDy2itkS45ZjfQOmD94gAAAIB6FZ9qI7zZMMLG+i8IM60OqxMhg9JQ2UO2DnY4FRFHiiRbjFrAiJkUS8l3Nn+ffpovzDOyK4OWQYN2kZps6ctd0xzn3sVjQJWeOcBpmxJIm+YvLbXPPZbNveU/B5CC+frYgeVvG42WByvjq2ucpzDM3PcoMeMXhjHMurTND04/cQ== dcc@asldcc01"

          "keyThree":
            "sources":
              - "us"
            "keys":
              - "ssh-dss AAAAB3NzaC1kc3MAAACBALn5OSYu3gGT4a+WhCfkT2SRqlUVJZQunL40r1ZIEulAzt9menFf6HEXeldEYwJV2wNI2XZkV8aI1LYCvw8sfwtbKs4bOJpHHGXlmTH/7HlICirjfffttDaE+4ie03AeZxUvCRoA/mP8/t1qDmlQ/L6Ox/TAYwC4dW+aRcoqTisHAAAAFQC3BZDGaKHA1U7EUc0JwPieFtCYLQAAAIATY+8vxiL5s/sXNC8zHFyYFGKFbGWboUpReC7UK3Dh0LOm49iOxHNg2ytEPRKXguTvEvC+TTOtmAoh8331oMfZbROzf+VGWvmTAcDlV3gseHqFk8S0T2CCSLg2Hj988n//3fA+pwUTgDhyr/PeJIAS7LjxbWdQLqq72P8NHEmR3gAAAIASWWW/QVU/uYg/KiUVdjYRS6HzZkGpQlj1CC4sKQUeUp13awRpxovgjy5Z7wNksbba7pWNNtB8s8Lw9iryfe2GSxUmJZRxoXy73ssqDm9su/M1NceexrltTcvAmxbe99Nq9jMo2HBCHKUPear2waaoMu8WQUCq6nal08BiYpTQwA== ShakeMap Atlas Key for ComCat"

          "keyFour":
            "keys":
              - "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAt6jmThBZnA5H6G5QGqwT6AGygGbKgR/p+z00tQz7mWEMWt028Hf6E4GZQaJs16hurSMvDIjPvDt/DzIFVeVoApYTLwfhGzpnv4g04O2ynvKKUKEYJWg3bVHPZ/zkj04I+F/ku7MxI7SzUZPqjI9q3lWZKztu2jLkrKqbC5zye0U= postproc@aqmspp1"
Edited by Hawthorne, Bryan D

Merge request reports

Loading