diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..8edefa61 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,103 @@ +# Contributing to Overture + +We appreciate your interest in contributing to the Overture project. We are the Genome Informatics Software Engineering team from Ontario Institute for Cancer Research. At OICR we develop new software, databases and other necessary components to store, organize and compute over the large and complex datasets being generated by our cancer research programs. Embodying OICR's values of collaboration and community, we are firm believers in open-source and open-science. As such we strongly believe in the collective power of expertise and shared resources. + +## Code of Conduct + +By participating in this project, you are expected to abide by our [Code of Conduct](https://docs.overture.bio/community/code-of-conduct). Please take the time to read it carefully before contributing. + +## Get Involved + +**Getting Started:** Our primary platform for community support, feature requests, and general discussions is GitHub Discussions. This allows us to keep all conversations in one place and make them easily searchable for future reference. + + +**Community Support:** Our primary platform for community support, feature requests, and general discussions is [GitHub Discussions](https://github.com/overture-stack/docs/discussions). This allows us to keep all conversations in one place and make them easily searchable for future reference. + +- **Getting Help:** If you need assistance with Overture, please create a [new discussion in our support category](https://github.com/overture-stack/docs/discussions/categories/support). + - Before creating a new discussion, please search existing discussions to see if your question has already been answered. +- **Feature Requests & Proposals:** We love hearing your ideas for improving Overture! Before making a feature request, please check our [**feature roadmap**](https://github.com/orgs/overture-stack/projects/11/views/1) to see if your idea is already planned. + - If your idea isn't on the roadmap, feel free to [**submit a feature request**](https://github.com/overture-stack/docs/discussions/categories/ideas) by creating a new discussion in our Ideas category +- **Report a Potential Bug:** We use GitHub Issues primarily for tracking confirmed bugs and ticketing development tasks. If you come across a potential bug or issue, please first post it to our [**GitHub support discussion forum**](https://github.com/overture-stack/docs/discussions/categories/support). + - This allows us to confirm the issue and gather more information if needed. If we determine that further development is required, we will create and tag you into a GitHub Issue from your discussion post. + +## Our Development Process + +We use GitHub issues and pull requests for communication related to code changes. + +### Branch Organization + +We use the following standard branches: + +- `main` is for stable production code +- `develop` is the integration branch for new features +- `feature/` for feature branches +- `release/v` for release branches +- `hotfix/` for hotfix branches + +## Pull Requests + +### Submitting a Pull Request + +We welcome and encourage pull requests from the community. To submit a pull request, please follow these steps: + +1. **Fork the Repository**: Fork the Overture repository on GitHub. +2. **Clone Your Fork**: Clone your forked repository to your local machine. +3. **Create a New Branch**: Create a new branch for your changes. Use lowercase and hyphens (e.g., `feature/user-authentication`). Include ticket/issue numbers when applicable (e.g., `feature/PROJ-123-user-authentication`). +4. **Make Your Changes**: Implement your changes and commit them to your branch. Write clear, concise commit messages in present tense (e.g., "Add feature" not "Added feature"). Reference issue numbers in commits when applicable. +5. **Push Your Changes**: Push your changes to your forked repository. +6. **Submit a Pull Request**: Open a pull request against the main repository. + +### Best Practices + +1. **Keep PRs as small as possible:** Focus on one feature or bug fix per pull request. Break large changes into smaller, more manageable pieces making it easier for reviewers to understand and approve your changes. + +2. **Use descriptive titles:** Start with a verb (e.g., "Add", "Fix", "Update", "Refactor"), briefly summarize the main purpose of the PR and include the issue number if applicable (e.g., "Fix user authentication bug (#123)"). + +3. **Describe how you tested it:** Explain the testing process you followed and mention any new automated tests you've added. + +4. **Provide a clear description:** Explain the purpose of your changes and list the main modifications you've made. Mention any potential side effects or areas that might need extra attention. + +5. **Link related issues:** Reference any related issues or pull requests. Use GitHub keywords to automatically link issues (e.g., "Closes #123", "Fixes #456"). +6. **Keep the PR's branch up-to-date:** Regularly rebase your branch on the latest main branch and resolve any merge conflicts promptly. + +7. **Respond to feedback:** Be open to suggestions and willing to make changes. Address all comments from reviewers. If you disagree with a suggestion, explain your reasoning politely. + +8. **Include documentation updates:** If your changes affect user-facing features, update or create and issue detailing the relevant changes need to the documentation. Where appropriate include inline comments for complex code sections. + +10. **Be patient:** Reviewers will likely be unable to respond immediately. However, feel free to follow up politely if you haven't received feedback after a reasonable time. + +### Using Draft Pull Requests + +Draft Pull Requests are an excellent way to document work in progress and facilitate early feedback. Use them to: + +- Organize your thoughts and process +- Share early work and ideas with the team +- Get feedback on implementation approaches before finalizing code +- Track progress on long-running features + +Guidelines for Draft Pull Requests: + +1. **Creation**: + - Open a pull request and select "Create draft pull request" + - Clearly mark the title with [WIP] or [DRAFT] prefix +2. **Description**: + - Outline the current state of the work + - List planned tasks or improvements + - Highlight areas where feedback is specifically needed +3. **Updates**: + - Regularly update the description or provide comments following commits with progress notes +- Use task lists (using `- [ ]` in Markdown) to track completion of sub-tasks +4. **Collaboration**: + - Encourage early feedback and discussion + - Use the pull request comments for design discussions +5. **Finalization**: + - Complete all planned work and address feedback + - Update tests and documentation + - Click "Ready for review" to move out of draft state + +### Merging a Pull Request + +- Ensure all CI checks pass +- Obtain the required number of approvals +- Use the project's specified merge strategy (Typically squash and merge) +- Delete the source branch after merging if no longer needed diff --git a/LICENSE b/LICENSE deleted file mode 100644 index dba13ed2..00000000 --- a/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. diff --git a/README.md b/README.md index 2d79e12f..3d2d0c41 100644 --- a/README.md +++ b/README.md @@ -1,71 +1,68 @@ -# Score - File Transfer & Object Storage +# Score -[](http://slack.overture.bio) -[](https://github.com/overture-stack/score/blob/develop/LICENSE) -[](code_of_conduct.md) - -
-score-logo -
- -Genomics data volume and velocity have increased dramatically, rendering on-premise storage insufficient and demanding specialized software tools to manage data in the cloud. [Score](https://www.overture.bio/documentation/score/) addresses this by facilitating the transfer and storage of genomics data to and from a cloud network. - - +Score is a file transfer service designed to enable large-file upload and download, providing a robust API for secure file transfer and storage operations. It serves as an intermediary between object storage systems and user authorization mechanisms, using pre-signed URLs for efficient and protected data access.
> >
-> +> >
> -> *Score is a core component within the [Overture](https://www.overture.bio/) research software ecosystem. Overture is a toolkit of modular software components made to build into scalable genomics data management systems. See our [related products](#related-products) for more information on what Overture can offer.* +> *Score is part of [Overture](https://www.overture.bio/), a collection of open-source software microservices used to create platforms for researchers to organize and share genomics data.* > -> - -## Technical Specifications +## Key Features -- Written in JAVA -- Supports AWS S3, Azure, Google Cloud, Openstack with Ceph, Minio and all other S3-compliant cloud storage solutions -- Built-in [Samtools](http://www.htslib.org/) functionality including BAM and CRAM file slicing by genomic region -- ACL security using [OAuth 2.0](https://oauth.net/2/) and scopes based on study codes -- Multipart Uploads and Downloads -- REST API with [Swagger UI](https://swagger.io/tools/swagger-ui/) -- [MD5sum](https://www.intel.com/content/www/us/en/support/programmable/articles/000078103.html) validation +- **Multi-cloud Support**: Compatible with AWS S3, Azure Storage, and any object storage with an S3 compliant API (Minio, Ceph, etc.) +- **High-performance Transfers**: Implements multipart uploads and downloads for optimal throughput +- **Genomic Data Handling (SamTools)**: Supports BAM/CRAM file slicing by genomic region and provides built-in samtools operations for BAM file handling +- **Data Integrity**: Ensures file integrity through MD5 checksum validation on uploads and downloads +- **Security**: Implements ACL-based security using OAuth2 with study code-scoped access +- **Metadata Integration**: Integrates with the Song metadata management system for comprehensive data tracking +- **File Bundling**: Enables efficient transfer of multiple files in a single bundle +- **Resumable Downloads**: Supports resuming downloads after network interruptions +- **FUSE Support**: Offers file system in Userspace (FUSE) support for enhanced file operations +- **Interactive API Documentation:** Built-in Swagger UI for easy API interaction and exploration ## Documentation -- :construction: Developer documentation, including instructions for running Score from source can be found in the [Wiki](https://github.com/overture-stack/score/wiki) :construction: -- For user documentation, including installation, configuration and usage guides, see the Overture websites [Score documentation page](https://www.overture.bio/documentation/score/) +Technical resources for those working with or contributing to the project are available from our official documentation site, the following content can also be read and updated within the `/docs` folder of this repository. -## Support & Contributions +- **[Score Overview](https://docs.overture.bio/docs/core-software/Score/overview)** +- [**Setting up the Development Enviornment**](https://docs.overture.bio/docs/core-software/Score/setup) +- [**Common Usage Docs**](https://docs.overture.bio/docs/core-software/Score/setup) -- Filing an [issue](https://github.com/overture-stack/score/issues) -- Making a [contribution](CONTRIBUTING.md) -- Connect with us on [Slack](https://join.slack.com/t/overture-bio/shared_invite/zt-21tdumtdh-9fP1TFeLepK4~Lc377rOYw) -- Add or Upvote a [feature request](https://github.com/overture-stack/score/issues?q=is%3Aopen+is%3Aissue+label%3Anew-feature+sort%3Areactions-%2B1-desc) +## Development Environment -## Related Software +- [Java 11 (OpenJDK)](https://openjdk.java.net/projects/jdk/11/) +- [Maven 3.5+](https://maven.apache.org/) (or use provided wrapper) +- [VS Code](https://code.visualstudio.com/) or preferred Java IDE +- [Docker](https://www.docker.com/) Container platform -
- Overture overview -
+## Support & Contributions -Score commonly works in tandem with our metadata service, [Song](https://github.com/overture-stack/SONG). While Score handles object storage and file transfer, Song validates and tracks all the associated file metadata. +- For support, feature requests, and bug reports, please see our [Support Guide](https://docs.overture.bio/community/support). +- For detailed information on how to contribute to this project, please see our [Contributing Guide](https://docs.overture.bio/docs/contribution). -All our core microservices are included in the Overture **Data Management System** (DMS). Built from our core collection of microservices, the DMS offers turnkey installation, configuration, and deployment of Overture software. For more information on the DMS, read our [DMS documentation](https://www.overture.bio/documentation/dms/). +## Related Software -See the links below for information on our other research software tools: +The Overture Platform includes the following Overture Components:
|Software|Description| |---|---| -|[Ego](https://github.com/overture-stack/ego)|An authorization and user management service| -|[Ego UI](https://github.com/overture-stack/ego-ui)|A UI for managing Ego authentication and authorization services| -|[Score](https://github.com/overture-stack/score)| Transfer data to and from any cloud-based storage system| -|[Song](https://github.com/overture-stack/song)|Catalog and manage metadata associated to file data spread across cloud storage systems| -|[Maestro](https://github.com/overture-stack/maestro)|Organizing your distributed data into a centralized Elasticsearch index| -|[Arranger](https://github.com/overture-stack/arranger)|A search API with reusable UI components that build into configurable and functional data portals| -|[DMS-UI](https://github.com/overture-stack/dms-ui)|A simple web browser UI that integrates Ego and Arranger| +|[Score](https://github.com/overture-stack/score/)| Transfer data to and from any cloud-based storage system | +|[Song](https://github.com/overture-stack/song/)| Catalog and manage metadata associated to file data spread across cloud storage systems | +|[Maestro](https://github.com/overture-stack/maestro/)| Organizing your distributed data into a centralized Elasticsearch index | +|[Arranger](https://github.com/overture-stack/arranger/)| A search API with reusable search UI components | +|[Stage](https://github.com/overture-stack/stage)| A React-based web portal scaffolding | +|[Lyric](https://github.com/overture-stack/lyric)| A model-agnostic, tabular data submission system | +|[Lectern](https://github.com/overture-stack/lectern)| Schema Manager, designed to validate, store, and manage collections of data dictionaries. | + +If you'd like to get started using our platform [check out our quickstart guides](https://docs.overture.bio/guides/getting-started) + +## Funding Acknowledgement + +Overture is supported by grant #U24CA253529 from the National Cancer Institute at the US National Institutes of Health, and additional funding from Genome Canada, the Canada Foundation for Innovation, the Canadian Institutes of Health Research, Canarie, and the Ontario Institute for Cancer Research. diff --git a/code_of_conduct.md b/code_of_conduct.md deleted file mode 100755 index 45d257b2..00000000 --- a/code_of_conduct.md +++ /dev/null @@ -1,133 +0,0 @@ - -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or advances of - any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, - without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[INSERT CONTACT METHOD]. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 538a98c1..00000000 --- a/docs/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXPROJ = score -SOURCEDIR = . -CONFDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/docs/assets/KC-Login.png b/docs/assets/KC-Login.png new file mode 100644 index 00000000..2e7f3ab0 Binary files /dev/null and b/docs/assets/KC-Login.png differ diff --git a/docs/assets/account-profile.png b/docs/assets/account-profile.png new file mode 100644 index 00000000..401975ca Binary files /dev/null and b/docs/assets/account-profile.png differ diff --git a/docs/assets/auth-scope.png b/docs/assets/auth-scope.png new file mode 100644 index 00000000..f5a9e103 Binary files /dev/null and b/docs/assets/auth-scope.png differ diff --git a/docs/assets/azure-dash.png b/docs/assets/azure-dash.png new file mode 100644 index 00000000..fc254834 Binary files /dev/null and b/docs/assets/azure-dash.png differ diff --git a/docs/assets/azure-policies.png b/docs/assets/azure-policies.png new file mode 100644 index 00000000..638a35c8 Binary files /dev/null and b/docs/assets/azure-policies.png differ diff --git a/docs/assets/capability-config.png b/docs/assets/capability-config.png new file mode 100644 index 00000000..a92812f6 Binary files /dev/null and b/docs/assets/capability-config.png differ diff --git a/docs/assets/complete.png b/docs/assets/complete.png new file mode 100644 index 00000000..1ea4a9d9 Binary files /dev/null and b/docs/assets/complete.png differ diff --git a/docs/assets/finding-client.png b/docs/assets/finding-client.png new file mode 100644 index 00000000..7a107808 Binary files /dev/null and b/docs/assets/finding-client.png differ diff --git a/docs/assets/new-group.png b/docs/assets/new-group.png new file mode 100644 index 00000000..01d05540 Binary files /dev/null and b/docs/assets/new-group.png differ diff --git a/docs/assets/new-permission.png b/docs/assets/new-permission.png new file mode 100644 index 00000000..4ec5e1b2 Binary files /dev/null and b/docs/assets/new-permission.png differ diff --git a/docs/assets/new-policy.png b/docs/assets/new-policy.png new file mode 100644 index 00000000..226d4beb Binary files /dev/null and b/docs/assets/new-policy.png differ diff --git a/docs/assets/new-realm.png b/docs/assets/new-realm.png new file mode 100644 index 00000000..1970cd0a Binary files /dev/null and b/docs/assets/new-realm.png differ diff --git a/docs/assets/new-resource.png b/docs/assets/new-resource.png new file mode 100644 index 00000000..c90f74b3 Binary files /dev/null and b/docs/assets/new-resource.png differ diff --git a/docs/assets/new-user.png b/docs/assets/new-user.png new file mode 100644 index 00000000..746350ee Binary files /dev/null and b/docs/assets/new-user.png differ diff --git a/docs/assets/scoreDev.svg b/docs/assets/scoreDev.svg new file mode 100644 index 00000000..be9221f6 --- /dev/null +++ b/docs/assets/scoreDev.svg @@ -0,0 +1 @@ +
e
e
Search & Exploration
Search & Exploration
Arranger Configs
Define the structure and formatting of your data
Arranger Configs...


Index Mapping
Define the structure of your index

Index Mapping...
Event Processing
Message queuing of publication events for triggering downstream data indexing 
Event Processing...
Data Management & Storage
Data Management & Storage
z

Song Schema
Define input fields with rules, logic and syntax

Song Schema...

Object Storage Providers
Score is compatible with any S3 compliant object storage provider

Object Storage Providers...
Authorization & Authentication
Authorization & Authentication

Overture API Key Provider
Extends Keycloak's functionality to support API authentication

Overture API Key Provider...
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index 2185f0c3..00000000 --- a/docs/conf.py +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# score documentation build configuration file, created by -# sphinx-quickstart on Thu Sep 27 15:44:32 2018. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = ['sphinx.ext.mathjax', - 'sphinx.ext.viewcode'] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = 'score' -copyright = '2018, andricdu' -author = 'andricdu' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = '1.4.0' -# The full version, including alpha/beta/rc tags. -release = '1.4.0' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = 'sphinx_rtd_theme' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# This is required for the alabaster theme -# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars -html_sidebars = { - '**': [ - 'relations.html', # needs 'show_related': True theme option to display - 'searchbox.html', - ] -} - - -# -- Options for HTMLHelp output ------------------------------------------ - -# Output file base name for HTML help builder. -htmlhelp_basename = 'scoredoc' - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'score.tex', 'score Documentation', - 'andricdu', 'manual'), -] - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'score', 'score Documentation', - [author], 1) -] - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'score', 'score Documentation', - author, 'score', 'One line description of project.', - 'Miscellaneous'), -] - - - diff --git a/docs/img/azure_policies.png b/docs/img/azure_policies.png deleted file mode 100644 index a06ff45e..00000000 Binary files a/docs/img/azure_policies.png and /dev/null differ diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index 34d422c3..00000000 --- a/docs/index.rst +++ /dev/null @@ -1,17 +0,0 @@ -================================= -Score Documentation -================================= - -.. toctree:: - :maxdepth: 4 - - introduction.rst - - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/docs/introduction.rst b/docs/introduction.rst deleted file mode 100644 index 0c55f96c..00000000 --- a/docs/introduction.rst +++ /dev/null @@ -1,89 +0,0 @@ -introduction.rst - -============== -Introduction -============== - - -What is Score? -====================== - -`Score `_ facilitates the transfer and storage of your data seamlessly for cloud-based projects. File bundling, resumable downloads, and BAM/CRAM slicing make data transfer fast and smooth. - -The method with which Score facilitates the transfer of data is through the use of pre-signed URLs. As such, Score can be thought of as a broker between an object storage system and user authorization system, validating user access and generating signed URLs for object access. - - ------------------------------------------ - -.. _introduction_features: - -Features -====================== - -- Multipart Uploads and Downloads (high performance transfers) -- Support for AWS S3, Azure Storage, Google Cloud Storage -- Slicing of BAM and CRAM files by genomic region -- Client includes some samtools functionality such as viewing reads from a BAM -- MD5 validation of uploads and downloads -- ACL security using OAuth2 and scopes based on study codes -- Integrates with the SONG metadata system for data book keeping and consistency -- REST API with swagger docs - - -Projects Using Score -====================== - -1. **Cancer Collaboratory - Toronto**: https://storage.cancercollaboratory.org/swagger-ui.html -2. **AWS - Virginia**: https://virginia.cloud.icgc.org/swagger-ui.html - - -Getting Started -============================ - -Client ---------------- - -The Score Client is available to download as both a docker container or as a Java CLI application. - -The docker container can be pulled from here: - -``docker pull overture/score`` - -For the Java CLI, use the following steps: - -.. code-block:: bash - - wget -O score-client.tar.gz https://artifacts.oicr.on.ca/artifactory/dcc-release/bio/overture/score-client/[RELEASE]/score-client-[RELEASE]-dist.tar.gz - - tar xvzf score-client.tar.gz - - echo export PATH=$(pwd)/score-client-x.x.x/bin:$PATH >> ~/.bashrc - - source ~/.bashrc - - # you will then be able to use it by running the following command anywhere is the system - score-client - - -Server ---------------- - -To be Added... - - -License -============= -Copyright (c) 2018. Ontario Institute for Cancer Research - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as -published by the Free Software Foundation, either version 3 of the -License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index ff176b65..00000000 --- a/docs/make.bat +++ /dev/null @@ -1,37 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set CONFDIR=source -set BUILDDIR=_build -set SPHINXPROJ=score - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% - -:end -popd diff --git a/docs/overview.md b/docs/overview.md new file mode 100644 index 00000000..be0874a8 --- /dev/null +++ b/docs/overview.md @@ -0,0 +1,51 @@ +# Overview + +Score is a file transfer service designed to enable large-file upload and download, providign a robust API for secure file transfer and storage operations. It serves as an intermediary between object storage systems and user authorization mechanisms, using pre-signed URLs for efficient and protected data access. + +## System Architecture + +Score's primary function is to broker authenticated access to your object storage provider. It achieves this by: + +1. Validating user access rights against an authorization system (OAuth) +2. Generating time-limited pre-signed URLs for object access +3. Facilitating secure data transfer between clients and object storage + +![Score Arch](./assets/scoreDev.svg 'Score Architecture Diagram') + +As part of the larger Overture.bio software suite, Score is typically used with multiple other services including: + +- **Song:** A metadata management service made to manage file metadata independently from object storage concerns +- **Score Client:** A command line tool to streamline interactions with Scores REST API endpoints +- **Keycloak:** The authorization and authentication service used to provided OAuth2 authentication for Score + + +## Key Features + +- **Multi-cloud Support**: Compatible with AWS S3, Azure Storage, and any object storage with an S3 compliant API (Minio, Ceph, etc.) +- **High-performance Transfers**: Implements multipart uploads and downloads for optimal throughput +- **Genomic Data Handling (SamTools)**: Supports BAM/CRAM file slicing by genomic region and provides built-in samtools operations for BAM file handling +- **Data Integrity**: Ensures file integrity through MD5 checksum validation on uploads and downloads +- **Security**: Implements ACL-based security using OAuth2 with study code-scoped access +- **Metadata Integration**: Integrates with the Song metadata management system for comprehensive data tracking +- **File Bundling**: Enables efficient transfer of multiple files in a single bundle +- **Resumable Downloads**: Supports resuming downloads after network interruptions +- **FUSE Support**: Offers file system in Userspace (FUSE) support for enhanced file operations +- **Interactive API Documentation:** Built-in Swagger UI for easy API interaction and exploration + + +## Repository Structure +The repository is organized with the following directory structure: +``` +. +├── /score-client +├── /score-core +├── /score-fs +├── /score-server +└── /score-test +``` + +- **score-client:** Command line app for uploading and downloading files, published as a [docker container](https://github.com/overture-stack/score/pkgs/container/score) and availabe as an executable jar from [github releases](https://github.com/overture-stack/score/releases) +- **score-core:** Core library containing shared utilities and data models used by all other packages +- **score-fs:** File system operations module for managing local files +- **score-server:** Main server application that handles object storage and transfers, published as a [docker container](https://github.com/overture-stack/score/pkgs/container/score-server) +- **score-test:** Integration and end-to-end test suite for all packages diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 04c85770..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -sphinx -sphinx-autobuild -sphinx_rtd_theme diff --git a/docs/setup.md b/docs/setup.md new file mode 100644 index 00000000..b61ac433 --- /dev/null +++ b/docs/setup.md @@ -0,0 +1,171 @@ +# Setup + +## Prerequisites + +Before you begin, ensure you have the following installed on your system: +- [JDK11](https://www.oracle.com/ca-en/java/technologies/downloads/) +- [Docker](https://www.docker.com/products/docker-desktop/) (v4.32.0 or higher) + +## Score-Server Development Setup + +This guide will walk you through setting up a complete development environment, including Score and its complementary services. + +### Setting up supporting services + +We'll use our Conductor service, a flexible Docker Compose setup, to spin up Score's complementary services. + +1. Clone the Conductor repository and move into its directory: + + ```bash + git clone https://github.com/overture-stack/conductor.git + cd conductor + ``` + +2. Run the appropriate start command for your operating system: + + | Operating System | Command | + | ---------------- | --------------------- | + | Unix/macOS | `make scoreDev` | + | Windows | `./make.bat scoreDev` | + +
+ **Click here for a detailed breakdown** + + This command will set up all complementary services for Score development as follows: + + ![ScoreDev](./assets/scoreDev.svg 'Score Dev Environment') + + | Service | Port | Description | Purpose in Score Development | + | ----------- | ------ | ----------------------------------------------- | ------------------------------------------- | + | Conductor | `9204` | Orchestrates deployments and environment setups | Manages the overall development environment | + | Keycloak-db | - | Database for Keycloak (no exposed port) | Stores Keycloak data for authentication | + | Keycloak | `8180` | Authorization and authentication service | Provides OAuth2 authentication for Score | + | Song-db | `5433` | Database for Song | Stores metadata managed by Song | + | Song | `8080` | Metadata management service | Manages metadata for files stored by Score | + | Minio | `9000` | Object storage provider | Simulates S3-compatible storage for Score | + + - Ensure these ports are free on your system before starting the environment. + - You may need to adjust the ports in the `docker-compose.yml` file if you have conflicts with existing services. + + For more information, see our [Conductor documentation linked here](https://docs.overture.bio/docs/other-software/Conductor) + +
+ +### Running the Development Server + +1. Clone Score and move into its directory: + + ```bash + git clone https://github.com/overture-stack/score.git + cd score + ``` + +2. Build the application locally: + + ```bash + ./mvnw clean install -DskipTests + ``` + +
+ **Click here for an explaination of command above** + + - `./mvnw`: This is the Maven wrapper script, which ensures you're using the correct version of Maven. + - `clean`: This removes any previously compiled files. + - `install`: This compiles the project, runs tests, and installs the package into your local Maven repository. + - `-DskipTests`: This flag skips running tests during the build process to speed things up. + +
+ + :::tip + Ensure you are running JDK11. To check, you can run `java --version`. You should see something similar to the following: + ```bash + openjdk version "11.0.18" 2023-01-17 LTS + OpenJDK Runtime Environment Corretto-11.0.18.10.1 (build 11.0.18+10-LTS) + OpenJDK 64-Bit Server VM Corretto-11.0.18.10.1 (build 11.0.18+10-LTS, mixed mode) + ``` + ::: + +3. Start the Score Server: + + ```bash + ./mvnw spring-boot:run -Dspring-boot.run.profiles=default,s3,secure,dev -pl score-server + ``` + + :::info + + If you are looking to configure Score for your specific environment, [**the Score-servers configuration file can be found here**](https://github.com/overture-stack/score/blob/develop/score-server/src/main/resources/application.yml). A summary of the available Spring profiles is provided below: + +
+ **Click here for a summary of the Score-server spring profiles** + + **Score Profiles** + | Profile | Description | + | ----------- | ------------------------------------------------------------------------------------------------------------------------------- | + | `default` | Common settings for all environments. Includes server, S3, bucket, object, upload, and authentication configurations. | + | `ssl` | Enables SSL configuration for using a self-signed certificate in production deployments. | + | `azure` | Configuration for Azure blob storage. Includes Azure-specific settings and bucket policies. | + | `s3` | Configuration for Amazon S3 or S3-compatible storage. Includes endpoint, access key, and secret key settings. | + | `prod` | Production environment configuration. Enables secure S3 connections and sets the metadata URL. | + | `secure` | Security configuration for OAuth2 and JWT. Includes settings for resource server, authentication server, and scope definitions. | + | `dev` | Development environment configuration. Uses non-secure S3 connections, local endpoints, and disables upload cleaning. | + | `benchmark` | Configuration for benchmarking purposes. Includes SSL settings and a non-secure S3 endpoint. | + +
+ + ::: + + +### Verification + +After installing and configuring Score, verify that the system is functioning correctly: + +1. **Check Server Health** + ```bash + curl -s -o /dev/null -w "%{http_code}" "http://localhost:8087/download/ping" + ``` + - Expected result: Status code `200` + - Troubleshooting: + - Ensure Score server is running + - Check you're using the correct port (default is 8087) + - Verify no firewall issues are blocking the connection + +2. **Check the Swagger UI** + - Navigate to `http://localhost:8087/swagger-ui.html` in a web browser + - Expected result: Swagger UI page with a list of available API endpoints + - Troubleshooting: + - Check browser console for error messages + - Verify you're using the correct URL + +:::info Need Help? +If you encounter any issues or have questions about our API, please don't hesitate to reach out through our relevant [**community support channels**](https://docs.overture.bio/community/support). +::: + +## Score-Client Setup + +The `score-client` is a CLI tool used for communicating with a `score-server`. For ease of deployment it can be run using Docker. The client can be configured through environment variables, which take precedence over the `application.yml` config. + + ```bash +docker run -d --name score-client \ + -e ACCESSTOKEN=68fb42b4-f1ed-4e8c-beab-3724b99fe528 \ + -e STORAGE_URL=http://localhost:8087 \ + -e METADATA_URL=http://localhost:8080 \ + --network="host" \ + --platform="linux/amd64" \ + --mount type=bind,source=${pwd},target=/output \ + ghcr.io/overture-stack/score:latest + ``` + +
+ **Click here for an explaination of command above** + - `-e ACCESSTOKEN=68fb42b4-f1ed-4e8c-beab-3724b99fe528` sets up the score-client with a pre-configured system-wide access token that works with the conductor service setup. + - `-e STORAGE_URL=http://score:8087` is the url for the Score server that the Score-Client will interact with. + - `-e METADATA_URL=http://song:8080` is the url for the song server that the score-client will interact with. + - `--network="host"` Uses the host network stack inside the container, bypassing the usual network isolation. This means the container shares the network namespace with the host machine. + - `--platform="linux/amd64"` Specifies the platform the container should emulate. In this case, it's set to linux/amd64, indicating the container is intended to run on a Linux system with an AMD64 architecture. + - `--mount type=bind,source={pwd},target=/output` mounts the directory and its contents (volume) from the host machine to the container. In this case, it binds the present working directory from the host to /output inside the container. Any changes made to the files in this directory will be reflected in both locations. +
+ +:::warning +This guide is meant to demonstrate the configuration and usage of Score for development purposes and is not intended for production. If you ignore this warning and use this in any public or production environment, please remember to use Spring profiles accordingly. For production do not use **dev** profile. +::: + diff --git a/docs/start-sphinx-server.sh b/docs/start-sphinx-server.sh deleted file mode 100755 index bfaabab6..00000000 --- a/docs/start-sphinx-server.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -sphinx-autobuild \ --b html \ --H localhost \ ---watch source \ ---ignore "*.swp" \ ---ignore "*.pdf" \ ---ignore "*.log" \ ---ignore "*.out" \ ---ignore "*.toc" \ ---ignore "*.aux" \ ---ignore "*.idx" \ ---ignore "*.ind" \ ---ignore "*.ilg" \ ---ignore "*.tex" \ ---ignore "*.pyc" \ ---ignore "*.py_*" \ ---ignore "*.rst_*" \ ---ignore "*4913*" \ --c source source _build/html \ No newline at end of file diff --git a/docs/usage/01-upload.md b/docs/usage/01-upload.md new file mode 100644 index 00000000..7778ad66 --- /dev/null +++ b/docs/usage/01-upload.md @@ -0,0 +1,92 @@ +# File Upload + +Data uploads using the Client or API. + +:::info Data Submission Guide +For detailed step-by-step instructions on using Song and Score clients for data submissions, see our [**platform guide on CLI submissions**](https://docs.overture.bio/guides/user-guides/cli-submissions). +::: + +## Installing Score-Client + +To run the score-client using Docker, provide the following environment variables: +- `STORAGE_URL`: Score server URL +- `METADATA_URL`: Song server URL +- `ACCESSTOKEN`: Valid access token + +Use this command to run a Score Client docker container: + +```bash +docker run -d --name score-client \ + -e ACCESSTOKEN=${token} \ + -e STORAGE_URL=${scoreServerUrl} \ + -e METADATA_URL=${songServerUrl} \ + --network="host" \ + --platform="linux/amd64" \ + --mount type=bind,source="$(pwd)",target=/output \ + ghcr.io/overture-stack/score:latest +``` + +Replace all `${}` placeholders with your environment's values. + +
+ Detailed command breakdown + + - `-d`: Runs container in detached mode (background) + - `-e ACCESSTOKEN=${token}`: Access token from the platform's auth service + - `-e STORAGE_URL=${scoreServerUrl}`: Score server URL + - `-e METADATA_URL=${songServerUrl}`: Song server URL + - `--network="host"`: Uses host network stack + - `--platform="linux/amd64"`: Specifies container platform + - `--mount type=bind,source="$(pwd)",target=/output`: Mounts current directory to container's `/output` + +
+ +## Uploading File Data + +Use the Score Client's `upload` command to upload file data. Main upload methods: + +- `--file`: Upload a specific file by path +- `--manifest`: Upload files based on a manifest file +- `--object-id`: Upload a specific file by object ID + +### Upload Options + +| Option | Description | +|--------|-------------| +| `--force` | Re-upload existing files (overwrite) | +| `--md5` | Specify MD5 checksum of the file | +| `--validate` | Validate file using MD5 checksum | +| `--verify-connection` | Verify object storage connection before upload | + +### Upload Example + +To upload using a manifest file: + +```bash +docker exec score-client sh -c "score-client upload --manifest .//manifest.txt" +``` + +Replace `` with the location of your manifest file. + +A successful upload will produce output similar to: + +```shell +Uploading object: '/home/ubuntu/songdata/input-files/example.vcf.gz.idx' using the object id e98daf88-fdf8-5a89-9803-9ebafb41de94 +100% [##################################################] Parts: 1/1, Checksum: 100%, Write/sec: 1000B/s, Read/sec: 0B/s +Finalizing... +Total execution time: 3.141 s +Total bytes read : 0 +Total bytes written : 24 +Upload completed +Uploading object: '/home/ubuntu/songdata/input-files/example.vcf.gz' using the object id 440f4559-e905-55ec-bdeb-9518f823e287 +100% [##################################################] Parts: 1/1, Checksum: 100%, Write/sec: 7.8K/s, Read/sec: 0B/s +Finalizing... +Total execution time: 3.105 s +Total bytes read : 0 +Total bytes written : 52 +Upload completed +``` + +:::info Support +If you encounter any issues or have questions, please don't hesitate to reach out through our relevant [community support channels](https://docs.overture.bio/community/support) +::: \ No newline at end of file diff --git a/docs/usage/02-download.md b/docs/usage/02-download.md new file mode 100644 index 00000000..d8581134 --- /dev/null +++ b/docs/usage/02-download.md @@ -0,0 +1,80 @@ +# File Download + +Data download using the Score Client. + +:::info Download Guide +For detailed step-by-step instructions on using Song and Score clients for data downloads, see our [**platform guide on CLI downloads**](https://docs.overture.bio/guides/user-guides/cli-downloads). +::: + +## Installing Score-Client + +To run the score-client using Docker, provide the following environment variables: +- `STORAGE_URL`: Score server URL +- `METADATA_URL`: Song server URL +- `ACCESSTOKEN`: Valid access token + +Use this command to run a Score Client docker container: + +```bash +docker run -d --name score-client \ + -e ACCESSTOKEN=${token} \ + -e STORAGE_URL=${scoreServerUrl} \ + -e METADATA_URL=${songServerUrl} \ + --network="host" \ + --platform="linux/amd64" \ + --mount type=bind,source="$(pwd)",target=/output \ + ghcr.io/overture-stack/score:latest +``` + +Replace all `${}` placeholders with your environment's values. + +
+ Detailed command breakdown + + - `-d`: Runs container in detached mode (background) + - `-e ACCESSTOKEN=${token}`: Access token from the platform's auth service + - `-e STORAGE_URL=${scoreServerUrl}`: Score server URL + - `-e METADATA_URL=${songServerUrl}`: Song server URL + - `--network="host"`: Uses host network stack + - `--platform="linux/amd64"`: Specifies container platform + - `--mount type=bind,source="$(pwd)",target=/output`: Mounts current directory to container's `/output` + +
+ +## Downloading File Data + +Use the Score Client's `download` command to retrieve file data using any the following download methods: + +- `--analysis-id`: Download files for a specific Song analysis ID +- `--manifest`: Download files based on a manifest file +- `--object-id`: Download a specific file object +- `--program-id`: Download files for a specific Song program +- `--study-id`: Download files for a specific Song study + +### Download Options + +| Option | Description | +|--------|-------------| +| `--force` | Re-download existing files (overwrite) | +| `--index` | Download file index if available | +| `--length` | Limit download size (bytes) | +| `--offset` | Start download from specific byte position | +| `--output-dir` | Specify download directory | +| `--output-layout` | Set output directory layout (`bundle`, `filename`, or `id`) | +| `--validate` | Validate file using MD5 checksum | +| `--verify-connection` | Verify object storage connection before download | + +### Download Example + +To download using a manifest file: + +```shell +docker exec score-client sh -c "score-client download --manifest .//manifest.txt --output-dir ./" +``` + +- Replace `` with the manifest file location +- Replace `` with your desired download location + +:::info Score Client Reference Doc +For more information see our [**Score Client command reference documentation**](https://docs.overture.bio/docs/core-software/Score/usage/client-reference) +::: \ No newline at end of file diff --git a/docs/usage/03-object-storage.md b/docs/usage/03-object-storage.md new file mode 100644 index 00000000..84c756c4 --- /dev/null +++ b/docs/usage/03-object-storage.md @@ -0,0 +1,151 @@ +# Object Storage Setup + +To set up your object storage for Score: + +1. **Register with an object storage provider** of your choice and follow their instructions for setting up and configuring their service. + + :::info Minio Local Quickstart + If you'd like to quickly spin up a compatible object storage locally, you can run the following command: `docker run --name minIO -p 9000:9000 -e MINIO_ACCESS_KEY=minio -e MINIO_SECRET_KEY=minio123 minio/minio:RELEASE.2018-05-11T00-29-24Z server /data` + ::: + +2. **Create two data buckets for Score** to use: + +- A bucket to store object data +- A bucket to store and maintain state information + + :::tip + After creation, remember the IDs of both buckets, as they will be required later for configuring Score. + ::: + +3. You may need to **create a `/data` sub-folder** in advance for each bucket. This requirement depends on your storage provider and is summarized below: + + | Storage Provider | Data sub-folder required | + |--|--| + | Amazon S3 | No | + | Microsoft Azure | No | + | MinIO | No | + | OpenStack with Ceph | Yes | + +4. **Record the URL, access key, and secret key** used to access your storage service. These credentials will be required later for configuring Score. Record and securely store these values. + + :::info For Amazon S3 buckets + Remember to document the geographical region where you have configured your buckets to be stored, as this will be required when configuring Score. + ::: + +## Environment Variable Setup + +Once your object storage is established, the next step involves configuring Score for connection. The specific configuration settings will vary based on your object storage provider. Below are the detailed setup instructions. + +### AWS, Ceph, or Minio + +To connect Score with AWS, Ceph, or Minio storage, modify your `.env.score` file as follows: + +```bash +# ============================ +# Object Storage Configuration Variables +# ============================ + +SPRING_PROFILES_ACTIVE=prod,aws + +S3_ENDPOINT=http://localhost:9000 +S3_ACCESS_KEY=minio +S3_SECRETKEY=minio123 +S3_SIGV4ENABLED=true + +BUCKET_NAME_OBJECT=object.bucket +BUCKET_NAME_STATE=state.bucket +BUCKET_SIZE_POOL=0 +BUCKET_SIZE_KEY=2 + +UPLOAD_PARTSIZE=1048576 +UPLOAD_RETRY_LIMIT=10 +UPLOAD_CONNECTION_TIMEOUT=60000 +UPLOAD_CLEAN_CRON="0 0 0 * * ?" +UPLOAD_CLEAN_ENABLED=true +``` + +
+**Click here for a summary of these variables** + +**Storage Connection Settings** +* `S3_ENDPOINT`: API endpoint URL of your storage service. Score will communicate with the service via this URL +* `S3_ACCESSKEY`: Access key for your object storage buckets +* `S3_SECRETKEY`: Secret key for your object storage buckets +* `S3_SIGV4ENABLED`: Whether to use AWS S3 Signature Version 4 for authentication (true/false) + +**Bucket Configuration** +* `BUCKET_NAME_OBJECT`: ID of the bucket for storing object data +* `BUCKET_NAME_STATE`: ID of the bucket for storing state information +* `BUCKET_SIZE_POOL`: Used for bucket size pooling +* `BUCKET_SIZE_KEY`: Used for bucket size key configuration + +**Upload Settings** +* `UPLOAD_PARTSIZE`: Byte size of each upload chunk to the object storage (adjust for performance) +* `UPLOAD_RETRY_LIMIT`: Number of retry attempts for failed uploads before aborting +* `UPLOAD_CONNECTION_TIMEOUT`: Timeout duration in milliseconds for idle connections + +**Optional Cleanup Configuration** +* `UPLOAD_CLEAN_CRON`: Schedule for the cleanup cron job (optional) +* `UPLOAD_CLEAN_ENABLED`: Whether to enable the cleanup cron job (optional, true/false) + +
+ +### Azure + +For connecting Score with Azure storage, update `.env.score` as follows: + +```bash +SPRING_PROFILES_ACTIVE=prod,azure + +AZURE_ENDPOINT_PROTOCOL=https +AZURE_ACCOUNT_NAME={storage_account_name} +AZURE_ACCOUNT_KEY={storage_account_secret_key} + +BUCKET_NAME_OBJECT={object_bucket} # Object data storage bucket/container name +BUCKET_POLICY_UPLOAD={write_policy} # Access policy name for write operations +BUCKET_POLICY_DOWNLOAD={read_policy} # Access policy name for read operations + +UPLOAD_PARTSIZE=104587 +DOWNLOAD_PARTSIZE=250000000 # Default part size for downloads + +OBJECT_SENTINEL=heliograph # Required sample object/file name for `ping` operations +``` + +
+**Click here for a summary of these variables** + +**Azure Connection Settings** +* `AZURE_ENDPOINT_PROTOCOL`: Communication protocol for the Azure storage API endpoint (e.g., https) +* `AZURE_ACCOUNT_NAME`: Account name for accessing Azure object storage +* `AZURE_ACCOUNT_KEY`: Account key for accessing Azure object storage + +**Bucket Configuration** +* `BUCKET_NAME_OBJECT`: Bucket ID for storing object data +* `BUCKET_POLICY_UPLOAD`: Access policy name for write operations +* `BUCKET_POLICY_DOWNLOAD`: Access policy name for read operations + +**Performance Settings** +* `UPLOAD_PARTSIZE`: Byte size of each upload chunk (adjust for performance) +* `DOWNLOAD_PARTSIZE`: Byte size of each download chunk (adjust for performance) + +**Monitoring Configuration** +* `OBJECT_SENTINEL`: Default sample object/file name for 'ping' operations + +
+ +#### Access Policy Configuration for Azure + +For Azure storage, you must define a storage access policy for your container. + +1. **Access the Azure dashboard:** Select containers from the left-hand menu. +2. **Locate your container:** Choose `Access Policy` from the dropdown menu. + + ![azure-dash](../assets/azure-dash.png) + +3. **Create `write` and `readonly` access policies:** + + ![azure-policies](../assets/azure-policies.png) + + :::info Azure storage access policies + For more information on Azure storage access policies, visit [the official Azure storage services documentation](https://learn.microsoft.com/en-us/rest/api/storageservices/define-stored-access-policy#create-or-modify-a-stored-access-policy). + ::: \ No newline at end of file diff --git a/docs/usage/04-authentication.md b/docs/usage/04-authentication.md new file mode 100644 index 00000000..7127038d --- /dev/null +++ b/docs/usage/04-authentication.md @@ -0,0 +1,232 @@ +# Configuring Keycloak + +There are multiple methods of deploying Keycloak. Documentation on Keycloak deployment can be found on the [Official Keycloak website](https://www.keycloak.org/guides#getting-started). + +:::info Docker Quickstart +With Docker installed and running on your system you can quickly spin up Keycloak by running: + +```bash +docker run --name keycloak -d \ + -p 8080:8080 \ + -e KEYCLOAK_ADMIN=admin \ + -e KEYCLOAK_ADMIN_PASSWORD=admin \ + quay.io/keycloak/keycloak:22.0 start-dev +``` +If you need to install Docker, visit the [official Docker installation guide](https://docs.docker.com/get-docker/). + +This command starts Keycloak on local port `8080` and creates an initial admin user with the username `admin` and password `admin`. + +::: + +:::warning Development Configuration +This setup is designated for development and testing purposes and should not be used in production settings. For production deployments, please refer to [Configuring Keycloak for Production](https://www.keycloak.org/server/configuration-production). +::: + +## Overture API Key Provider + +The Overture API Key provider extends Keycloak's functionality by adding custom logic that allows Keycloak to interact with Score. The following steps outline how to download and install the Overture API Key provider: + +1. **Download the [Overture API Key Provider](https://github.com/oicr-softeng/keycloak-apikeys/releases/download/1.0.1/keycloak-apikeys-1.0.1.jar)**. +2. **Move the** `keycloak-apikeys.jar` file to the provider's folder within Keycloak (`opt/keycloak/providers/`). +3. **Restart the Keycloak server** for the updated provider to take effect. + +## Realm Configuration + +### Login to the Admin Console + +![Keycloak Login](../assets/KC-Login.png) + +To access the admin console, navigate to `/admin` (e.g., `localhost:8080/admin`) and log in with the credentials created during your Keycloak deployment. + +### Create a Realm + +Keycloak supports the creation of realms for managing isolated groups of applications and users. The default realm is named "master" and is intended solely for Keycloak management. + +![Creating a new realm](../assets/new-realm.png) + +1. Open the **Keycloak Admin Console**. +2. In the top-left corner, **select "master"**, then choose **"Create Realm"**. +3. **Type** `myrealm` in the Realm Name field and select **"Create"**. + +### Creating a Group + +As an example, let's create a `data submitters` group. Afterwards, we will configure and apply the appropriate permissions for this group. + +![Creating a new group](../assets/new-group.png) + +1. From the left-hand panel, select **"Groups"** and click **"Create group"**. +2. **Name the group** `data submitters` and select **"Create"**. + +### Creating a User + +To populate the realm with its first user: + +![Creating a new user](../assets/new-user.png) + +1. From the **Keycloak Admin Console**, under your newly created realm, select **"Users"** from the left-hand menu and click **"Add User"**. +2. **Input your details**, and then click **"Create"**. + + :::info Keycloak User Administration + Various configurations can be applied to new users. Detailed information can be found within [Keycloak's official Server Administration documentation](https://www.keycloak.org/docs/latest/server_admin/). + ::: + +Next, a password must be established: + +1. At the top of the **User details page**, select the **"Credentials" tab**. +2. **Input your Password**. To avoid mandatory password updates upon first login, **set "Temporary" to "Off"**. +3. Using the newly created username and password, **log in to the Keycloak Account Console** accessed at `http://localhost:8080/realms/myrealm/account/`. + + ![Account Profile](../assets/account-profile.png) + +From the Account Console, users can manage their accounts, modify profiles, activate two-factor authentication, and link identity provider accounts. + +## Application Setup + +Before setting up and applying permissions, we must create a "client" for the Score API. + +1. Re-open your Keycloak admin console at `/admin` and confirm you are within your recently created realm. +2. Select **"Clients"** and then **"Create client"** and input the following: + + | Field | Value | + | --------------- | -------------- | + | **Client Type** | OpenID Connect | + | **Client ID** | score-api | + +3. Select **"Next"**, **enable Client Authentication**, confirm **Standard flow is enabled**, **enable authorization**, then click **"Next"** and **"Save"** (Nothing needs to be input for login settings). + + ![Client Configuration](../assets/capability-config.png) + + :::info + Make sure you have enabled both **"Client Authentication"** and **"Authorization"**. + ::: + +### Configuring your Application + +After creating our client, the next step is configuring the resource name, scopes, policies, and permissions. All these settings can be adjusted within the **Authorization tab** of the client you've just created. To access your client, select **"Clients"** from the left-hand navigation menu and from the **"Client list"** select the newly created client. + +![Finding the Client](../assets/finding-client.png) + +#### Scopes + +Scopes represent actions that users can perform on a particular resource. They define the level of access a user has to a resource, such as reading, writing, updating, or deleting. For more details, check out the [Keycloak documentation](https://www.keycloak.org/docs/latest/authorization_services/index.html#scope). + +![New Scope](../assets/auth-scope.png) + +1. Navigate to the **Scopes tab** and select **"Create Authorization Scope"**. +2. **Create two authorization scopes**, one for **READ** and one for **WRITE** access. + +#### Resources + +Resources are objects or entities that users can interact with, such as a database, a file, or an API endpoint. When defining resources, you assign them to specific scopes, indicating what actions can be performed on those resources. For more details, check out the [Keycloak documentation](https://www.keycloak.org/docs/latest/authorization_services/index.html#resource). + +1. From the **Resource tab**, select **"Create Resource"**. +2. Your first resource is generalized and will not be associated with any specific study or program. Name the resource `score`, and from the **authorization scopes field** dropdown select **"READ" and "WRITE"**. +3. **Click Save** and return to the client details page. + + ![New Resource](../assets/new-resource.png) + + :::info Introducing New Studies or Programs + When introducing a new study or program, the creation of an additional resource within Keycloak is required. This includes re-applying the following policies, scopes, and permissions to desired users and groups. + ::: + +#### Policies + +Policies are rules that determine who can access resources based on certain conditions. They encapsulate the logic to decide whether to grant or deny access. Policies can be based on group membership, user attributes, or time-based conditions. For more details, check out the [Keycloak documentation](https://www.keycloak.org/docs/latest/authorization_services/index.html#policy). + +![New Policy](../assets/new-policy.png) + +1. Select the **Policy tab** and click **"Create Client Policy"**. +2. From the popup modal, select **"group policy"**. +3. Name your policy (e.g., `data submission policy`) and select **"Add groups"**. Check the box next to the Data Submitters group and click **"Add"**, then **"Save"**. + +#### Permissions + +Permissions are the final decision-making mechanism connecting resources, scopes, and policies. They define which users or groups can access which resources under what circumstances. Permissions are evaluated based on the evaluation strategy chosen (e.g., Affirmative, Unanimous, or Consensus). For more details, check out the [Keycloak documentation](https://www.keycloak.org/docs/latest/authorization_services/index.html#permission). + +1. Select the **Permissions tab**, click **"Create Permission"**, and from the dropdown select **"Create resource-based permission"**. +2. Assign the newly created resource, scope, and policy. Select `Affirmative strategy`. + +## Creating a New Study + +As mentioned previously, when introducing a new study or program, the creation of an additional resource within Keycloak is required. This includes re-applying policies and permissions to desired users and groups. + +To add a new study, **create a new resource** with the desired name of your study or program (i.e., `score.study123`) and **repeat the steps outlined above**, specifically the Resources, Policies, and Permissions sections of configuring your application. Once complete, you should have the following: + +![Completed](../assets/complete.png) + +## Integration with Score + +Update your `.env.score` file with the required Keycloak variables. The following code block will help you get started: + +```bash +# ============================ +# Keycloak Configurations +# ============================ + +# Profile configuration +SPRING_PROFILES_ACTIVE=aws,prod,secure + +# Server and authentication settings +SERVER_PORT=8087 +SERVER_SSL_ENABLED=false + +# Logging +LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_WEB=INFO +LOGGING_LEVEL_BIO_OVERTURE_SCORE_SERVER=INFO +LOGGING_LEVEL_ROOT=INFO + +# Server Authentication integration +AUTH_SERVER_PROVIDER=keycloak +AUTH_SERVER_KEYCLOAK_HOST=http://localhost:8080 +AUTH_SERVER_KEYCLOAK_REALM=myrealm +AUTH_SERVER_URL=http://localhost:8080/realms/{realmName}/apikey/check_api_key/ +AUTH_SERVER_TOKENNAME=apiKey +AUTH_SERVER_CLIENTID=score-api +AUTH_SERVER_CLIENTSECRET=scoresecret +AUTH_SERVER_SCOPE_STUDY_PREFIX=score. +AUTH_SERVER_SCOPE_UPLOAD_SUFFIX=.WRITE +AUTH_SERVER_SCOPE_DOWNLOAD_SUFFIX=.READ +AUTH_SERVER_SCOPE_DOWNLOAD_SYSTEM=score.WRITE +AUTH_SERVER_SCOPE_DOWNLOAD_SUFFIX=.READ +AUTH_SERVER_SCOPE_UPLOAD_SYSTEM=score.READ +AUTH_SERVER_SCOPE_UPLOAD_SUFFIX=.WRITE +SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWKSETURI=http://localhost:8080/realms/{realm-name}/protocol/openid-connect/certs +``` + +Replace any default values with the values specific to your environment. The variables are explained in detail below: + +
+**Click here for details** + +**Profile Configuration** +- `SPRING_PROFILES_ACTIVE`: Defines active Spring profiles for the application (aws,prod,secure) + +**Server and Authentication Settings** +- `SERVER_PORT`: The port number on which the server will listen (default: 8087) +- `SERVER_SSL_ENABLED`: Indicates whether SSL is enabled for the server (default: false) + +**Logging Configuration** +- `LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_WEB`: Sets Spring Framework web components logging level (default: INFO) +- `LOGGING_LEVEL_BIO_OVERTURE_SCORE_SERVER`: Sets Score Server components logging level (default: INFO) +- `LOGGING_LEVEL_ROOT`: Sets the root logging level (default: INFO) + +**Server Authentication Integration** +- `AUTH_SERVER_PROVIDER`: Specifies the authentication server provider (must be keycloak) +- `AUTH_SERVER_KEYCLOAK_HOST`: The host address for the Keycloak server (default: http://localhost:8080) +- `AUTH_SERVER_KEYCLOAK_REALM`: The realm in Keycloak where Score service is registered (example: myrealm) +- `AUTH_SERVER_URL`: Keycloak API endpoint for API key authentication +- `AUTH_SERVER_TOKENNAME`: Token identifier name (keep as default: apiKey) +- `AUTH_SERVER_CLIENTID`: Client ID for Score application in Keycloak (example: score-api) +- `AUTH_SERVER_CLIENTSECRET`: Client secret found under "Client details" → "Credentials tab" + +**Scope Configuration** +- `AUTH_SERVER_SCOPE_STUDY_PREFIX`: Prefix for study-specific scopes (default: score.) +- `AUTH_SERVER_SCOPE_DOWNLOAD_SYSTEM`: System-level download scope (default: score.WRITE) +- `AUTH_SERVER_SCOPE_DOWNLOAD_SUFFIX`: Study-level download scope suffix (default: .READ) +- `AUTH_SERVER_SCOPE_UPLOAD_SYSTEM`: System-level upload scope (default: score.READ) +- `AUTH_SERVER_SCOPE_UPLOAD_SUFFIX`: Study-level upload scope suffix (default: .WRITE) + +**JWT Configuration** +- `SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWKSETURI`: URI for JWT JSON Web Key Set for OAuth2 resource server + +
\ No newline at end of file diff --git a/docs/usage/05-hashicorp-vault.md b/docs/usage/05-hashicorp-vault.md new file mode 100644 index 00000000..ce22c7cd --- /dev/null +++ b/docs/usage/05-hashicorp-vault.md @@ -0,0 +1,112 @@ +# Vault Integration + +[HashiCorp's Vault](https://www.vaultproject.io/) provides secure secret management and can be integrated with Score for enhanced security. This section covers how to configure Score to work with Vault. + +:::info Optional Integration +Most deployments do not require Vault integration. The `optional:` prefix means your application will still start even if Vault is unavailable. If you're not explicitly using HashiCorp's Vault, you can skip this configuration. +::: + +## Configuration Options + +### Application YAML Configuration + +The primary way to configure Vault is in your `application.yml`: + +```yaml title="./score-server/src/main/resources/application.yml" +spring: + config: + import: optional:vault:// # Required for Vault integration + cloud: + vault: + # Basic Configuration (Optional) + # host: localhost + # port: 8200 + # scheme: https + + # Authentication (Choose ONE method) + + # Method 1: Token Authentication + # authentication: TOKEN + # token: your-vault-token + + # Method 2: AppRole Authentication + # authentication: APPROLE + # app-role: + # role-id: your-role-id + # secret-id: your-secret-id + # app-auth-path: approle + + # Connection Timeouts (Optional) + # connection-timeout: 5000 + # read-timeout: 15000 +``` + +### Environment Variables + +For Docker deployments, you can configure Vault through environment variables: + +```bash +# ============================ +# Vault Configuration +# ============================ + +# Required - enables Vault integration and configuration import +SPRING_CONFIG_IMPORT=optional:vault:// + +# Basic Configuration (Optional) +SPRING_CLOUD_VAULT_HOST=localhost +SPRING_CLOUD_VAULT_PORT=8200 +SPRING_CLOUD_VAULT_SCHEME=https # Use 'https' for production + +# Authentication (Choose ONE method) + +# Method 1: Token Authentication +SPRING_CLOUD_VAULT_AUTHENTICATION=TOKEN +SPRING_CLOUD_VAULT_TOKEN=your-vault-token + +# Method 2: AppRole Authentication +# SPRING_CLOUD_VAULT_AUTHENTICATION=APPROLE +# SPRING_CLOUD_VAULT_APP_ROLE_ROLE_ID=your-role-id +# SPRING_CLOUD_VAULT_APP_ROLE_SECRET_ID=your-secret-id +# SPRING_CLOUD_VAULT_APP_ROLE_APP_AUTH_PATH=approle + +# Connection Timeouts (Optional) +SPRING_CLOUD_VAULT_CONNECTION_TIMEOUT=5000 +SPRING_CLOUD_VAULT_READ_TIMEOUT=15000 +``` + +## Authentication Methods + +There are two authentication methods with Vault: + +1. **Token Authentication** (simplest, but less secure for production): + ```yaml + authentication: TOKEN + token: your-vault-token + ``` + +2. **AppRole Authentication** (recommended for services): + ```yaml + authentication: APPROLE + app-role: + role-id: your-role-id + secret-id: your-secret-id + app-auth-path: approle + ``` + + :::info AppRole Authentication + AppRole is Vault's recommended authentication method for applications and services. It uses two components: + + - `role-id`: A permanent identifier (like a username) + - `secret-id`: A rotatable credential (like a password) + + AppRole provides enhanced security features like credential rotation, fine-grained access control, and IP restrictions. Contact your Vault administrator to set up AppRole authentication. xwFor details, see [Vault's AppRole documentation](https://developer.hashicorp.com/vault/docs/auth/approle). + ::: + + :::warning Security Notice + Always follow HashiCorp's security guidelines when deploying Vault in production. Never commit sensitive values to version control - use environment variables or secure secret management. + ::: + +For more information about Vault configuration, refer to: +- [Official Vault Documentation](https://www.vaultproject.io/docs) +- [Spring Cloud Vault Documentation](https://docs.spring.io/spring-cloud-vault/docs/current/reference/html/) \ No newline at end of file diff --git a/docs/usage/06-api-reference.mdx b/docs/usage/06-api-reference.mdx new file mode 100644 index 00000000..085011d4 --- /dev/null +++ b/docs/usage/06-api-reference.mdx @@ -0,0 +1,38 @@ +# API Reference + +Scores API is a RESTful API that uses JSON for request and response bodies. It follows standard HTTP methods and status codes, providing a robust interface for managing score-related data in the Overture platform. + +### Access + +Depending on your environment, the Scores Swagger API can be accessed from the following URLs: + +- Development URL: `http://localhost:8087/swagger.html` +- Example production URL: `https://score.demo.overture.bio/swagger-ui.html` + +### Authentication + +In production environments, all requests to the Songs API require authentication using an API key. + +Include your API key in the `Authorization` header of each request as follows: + +``` +Authorization: Bearer YOUR_API_KEY +``` + +:::info API Key Access & Management +For information on accessing an API key from a deployed Overture platform, [**see our platform guide here**](https://docs.overture.bio/guides/user-guides/cli-submissions#generate-an-api-key). + +For information on generating and managing API keys in Overture using Keycloak, [**see our administration guide on identity & access management here**](https://docs.overture.bio/guides/administration-guides). +::: + +### Endpoints + +The following Swagger UI provides an interactive reference for all available Score API endpoints. You can explore the endpoints, request parameters and response schemas from the interface below. + +import SwaggerAPIDoc from '/src/components/SwaggerAPIDoc'; + + + +### Need Help? + +If you encounter any issues or have questions about our API, please don't hesitate to reach out through our relevant [community support channels](https://docs.overture.bio/community/support) \ No newline at end of file diff --git a/docs/usage/07-client-reference.md b/docs/usage/07-client-reference.md new file mode 100644 index 00000000..33c8c7ea --- /dev/null +++ b/docs/usage/07-client-reference.md @@ -0,0 +1,135 @@ +# Client Reference + +Commands and options supported by the Score client. + +## Download + +- The `download` command retrieves file object(s) from the remote storage repository. + +- **Usage:** `score-client download [OPTIONS]` + + | Option | Description | + |--------|-------------| + | `--analysis-id` | Download files for a specific Song analysis ID | + | `--force` | Force re-download of existing file (overrides local file) | + | `--index` | Also download file index if available | + | `--length` | Limit number of bytes to download (default: entire file) | + | `--manifest` | Download files based on manifest file ID, URL, or path | + | `--object-id` | Download a specific file object ID | + | `--offset` | Starting byte position for download (default: 0) | + | `--output-dir` | Path to download directory | + | `--output-layout` | Layout of output directory (bundle, filename, or id) | + | `--program-id` | Download files for a specific Song program ID | + | `--study-id` | Download files for a specific Song study ID | + | `--validate` | Perform MD5 checksum validation if available | + | `--verify-connection` | Verify connection to object storage repository first | + +## Help + +- The `help` command displays detailed information about Score client commands and options. + +## Info + +- The `info` command shows active configuration details of the Score client. + +- **Usage:** `score-client info [OPTIONS]` + + | Option | Description | + |--------|-------------| + | `--verbose` | Display all Score client configuration properties | + +## Manifest + +- The `manifest` command shows entries of a specific Score manifest file. + +- **Usage:** `score-client manifest [OPTIONS]` + + | Option | Description | + |--------|-------------| + | `--manifest` | Manifest file ID, URL, or path to display | + +## Mount + +- The `mount` command provides a read-only FUSE filesystem view of the object storage repository. + +- **Usage:** `score-client mount [OPTIONS]` + + | Option | Description | + |--------|-------------| + | `--cache-metadata` | Cache metadata on local disk for faster load times | + | `--daemonize` | Run mount point in background | + | `--layout` | Mount point directory layout (bundle or object-id) | + | `--manifest` | Manifest file to mount contents for | + | `--mount-point` | FUSE file system mount point | + | `--options` | Additional file system mount options | + | `--verify-connection` | Verify connection to object storage repository first | + +## Upload + +- The `upload` command sends file object(s) to the remote storage repository. + +- **Usage:** `score-client upload [OPTIONS]` + + | Option | Description | + |--------|-------------| + | `--file` | Path to specific file for upload | + | `--force` | Force re-upload of existing file (overrides repository file) | + | `--manifest` | Upload files using manifest file ID, URL, or path | + | `--md5` | MD5 checksum of file to upload | + | `--object-id` | Upload specific file by object ID | + | `--validate` | Perform MD5 checksum validation if available | + | `--verify-connection` | Verify connection to object storage repository first | + +## Url + +- The `url` command reveals the URL of a specific file object in the storage repository. + +- **Usage:** `score-client url [OPTIONS]` + + | Option | Description | + |--------|-------------| + | `--object-id` | Object ID of file to display URL for | + +## Version + +- The `version` command provides current version details of the Score client. + +## View + +- The `view` command stores locally and showcases a SAM or BAM file. + +- **Usage:** `score-client view [OPTIONS]` + + | Option | Description | + |--------|-------------| + | `--bed-query` | BED format file with ranges to query (overrides --query) | + | `--contained` | Output alignments completely contained in specified region | + | `--header-only` | Output only the SAM/BAM file header | + | `--input-file` | Local path to BAM file for querying | + | `--input-file-index` | Local path to index file (requires --input-file) | + | `--manifest` | Manifest file for querying object IDs and ranges | + | `--object-id` | Specific object ID to download slice from | + | `--output-file` | Name of output file | + | `--output-format` | Output file format (SAM or BAM) | + | `--output-dir` | Path to output directory (with --manifest) | + | `--output-index` | Write index files to output (with --manifest) | + | `--output-original-header` | Output entire original header | + | `--output-type` | Structure of output file (CROSS, MERGED, or TRIMMED) | + | `--query` | Query for BAM file content extraction (coordinate format) | + | `--reference-file` | Local path to FASTA file for CRAM decoding | + | `--stdout` | Send output to stdout (forces SAM format) | + | `--verify-connection` | Verify connection to object storage repository first | + +## Additional Options + +Additional option flags available for the `score-client` executable: + +| Option | Description | +|--------|-------------| +| `--profile` | Define specific environment profile for configuration | +| `--quiet` | Run client in quiet mode with minimal info messages | +| `--silent` | Run client in silent mode without any info messages | + +## Need Help? + +If you encounter any issues or have questions, please don't hesitate to reach out through our relevant [community support channels](https://docs.overture.bio/community/support) \ No newline at end of file diff --git a/docs/usage/usage.mdx b/docs/usage/usage.mdx new file mode 100644 index 00000000..09bee5d4 --- /dev/null +++ b/docs/usage/usage.mdx @@ -0,0 +1,21 @@ +# Usage + + + +The following usage docs provide instructions for common tasks and workflows in Score: + +

+ + + +### Score Terminology + +Whether you're new to these tools or looking to refresh your understanding, this glossary is here as a reference of key terms and concepts. + +- **Score Client**: A command-line tool used to interact with the Score server for uploading and downloading data files. + +- **Manifest**: A file that establishes a link between an analysis ID and the data files on your local system, used by Score for file uploads and downloads. + +- **Object ID**: A unique identifier assigned to each file object stored in object storage. + +- **MD5 Checksum**: A cryptographic hash function used to verify the integrity of files during upload and download processes. diff --git a/license.md b/license.md new file mode 100644 index 00000000..8b259447 --- /dev/null +++ b/license.md @@ -0,0 +1,660 @@ +# GNU AFFERO GENERAL PUBLIC LICENSE + +Version 3, 19 November 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. +https://fsf.org/ + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +## Preamble + +The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains +free software for all its users. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + +A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + +The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + +An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing +under this license. + +The precise terms and conditions for copying, distribution and +modification follow. + +## TERMS AND CONDITIONS + +### 0. Definitions. + +"This License" refers to version 3 of the GNU Affero General Public +License. + +"Copyright" also means copyright-like laws that apply to other kinds +of works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of +an exact copy. The resulting work is called a "modified version" of +the earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based +on the Program. + +To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user +through a computer network, with no transfer of a copy, is not +conveying. + +An interactive user interface displays "Appropriate Legal Notices" to +the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +### 1. Source Code. + +The "source code" for a work means the preferred form of the work for +making modifications to it. "Object code" means any non-source form of +a work. + +A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can +regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same +work. + +### 2. Basic Permissions. + +All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, +without conditions so long as your license otherwise remains in force. +You may convey covered works to others for the sole purpose of having +them make modifications exclusively for you, or provide you with +facilities for running those works, provided that you comply with the +terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for +you must do so exclusively on your behalf, under your direction and +control, on terms that prohibit them from making any copies of your +copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the +conditions stated below. Sublicensing is not allowed; section 10 makes +it unnecessary. + +### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such +circumvention is effected by exercising rights under this License with +respect to the covered work, and you disclaim any intention to limit +operation or modification of the work as a means of enforcing, against +the work's users, your or third parties' legal rights to forbid +circumvention of technological measures. + +### 4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +### 5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these +conditions: + +- a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- b) The work must carry prominent notices stating that it is + released under this License and any conditions added under + section 7. This requirement modifies the requirement in section 4 + to "keep intact all notices". +- c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + +A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +### 6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of +sections 4 and 5, provided that you also convey the machine-readable +Corresponding Source under the terms of this License, in one of these +ways: + +- a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the Corresponding + Source from a network server at no charge. +- c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- e) Convey the object code using peer-to-peer transmission, + provided you inform other peers where the object code and + Corresponding Source of the work are being offered to the general + public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, +family, or household purposes, or (2) anything designed or sold for +incorporation into a dwelling. In determining whether a product is a +consumer product, doubtful cases shall be resolved in favor of +coverage. For a particular product received by a particular user, +"normally used" refers to a typical or common use of that class of +product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected +to use, the product. A product is a consumer product regardless of +whether the product has substantial commercial, industrial or +non-consumer uses, unless such uses represent the only significant +mode of use of the product. + +"Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to +install and execute modified versions of a covered work in that User +Product from a modified version of its Corresponding Source. The +information must suffice to ensure that the continued functioning of +the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or +updates for a work that has been modified or installed by the +recipient, or for the User Product in which it has been modified or +installed. Access to a network may be denied when the modification +itself materially and adversely affects the operation of the network +or violates the rules and protocols for communication across the +network. + +Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +### 7. Additional Terms. + +"Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders +of that material) supplement the terms of this License with terms: + +- a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- c) Prohibiting misrepresentation of the origin of that material, + or requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- d) Limiting the use for publicity purposes of names of licensors + or authors of the material; or +- e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions + of it) with contractual assumptions of liability to the recipient, + for any liability that these contractual assumptions directly + impose on those licensors and authors. + +All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; the +above requirements apply either way. + +### 8. Termination. + +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +### 9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run +a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +### 10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +### 11. Patents. + +A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims owned +or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +A patent license is "discriminatory" if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on +the non-exercise of one or more of the rights that are specifically +granted under this License. You may not convey a covered work if you +are a party to an arrangement with a third party that is in the +business of distributing software, under which you make payment to the +third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties +who would receive the covered work from you, a discriminatory patent +license (a) in connection with copies of the covered work conveyed by +you (or copies made from those copies), or (b) primarily for and in +connection with specific products or compilations that contain the +covered work, unless you entered into that arrangement, or that patent +license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +### 12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under +this License and any other pertinent obligations, then as a +consequence you may not convey it at all. For example, if you agree to +terms that obligate you to collect a royalty for further conveying +from those to whom you convey the Program, the only way you could +satisfy both those terms and this License would be to refrain entirely +from conveying the Program. + +### 13. Remote Network Interaction; Use with the GNU General Public License. + +Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your +version supports such interaction) an opportunity to receive the +Corresponding Source of your version by providing access to the +Corresponding Source from a network server at no charge, through some +standard or customary means of facilitating copying of software. This +Corresponding Source shall include the Corresponding Source for any +work covered by version 3 of the GNU General Public License that is +incorporated pursuant to the following paragraph. + +Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + +### 14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions +of the GNU Affero General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever +published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions +of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + +### 15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT +WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. + +### 16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR +CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT +NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR +LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM +TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +### 17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +## How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + +To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively state +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + one line to give the program's name and a brief idea of what it does. + Copyright (C) year name of author + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see https://www.gnu.org/licenses/. + +Also add information on how to contact you by electronic and paper +mail. + +If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for +the specific requirements. + +You should also get your employer (if you work as a programmer) or +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. For more information on this, and how to apply and follow +the GNU AGPL, see https://www.gnu.org/licenses/. \ No newline at end of file diff --git a/score-server/src/main/resources/application.yml b/score-server/src/main/resources/application.yml index 3a7037e9..ad11db98 100644 --- a/score-server/src/main/resources/application.yml +++ b/score-server/src/main/resources/application.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2016 The Ontario Institute for Cancer Research. All rights reserved. +# Copyright (c) 2024 The Ontario Institute for Cancer Research. All rights reserved. # # This program and the accompanying materials are made available under the terms of the GNU Public License v3.0. # You should have received a copy of the GNU General Public License along with @@ -15,201 +15,190 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# DCC Storage Server - Configuration + +############################################################################### +# Application Configurations for the Score Server # +# This file contains placeholder configuration values for the various +# application profiles used by Score. +# Please update the values according to your specific environment. +############################################################################### ############################################################################### -# Profile - common +# Profile - common (default) +# This is the default profile with common settings for all environments. ############################################################################### server: - port: 5431 + port: 5431 # Default port for the Score application compression: enabled: true mime-types: application/json - #allowedOrigins can be configured to contain multiple values, all separated by commas - cors: - allowedOrigins: http://localhost:8081 + # Allowed origins for CORS (Cross-Origin Resource Sharing), multiple values can be added, separated by commas + cors: + allowedOrigins: http://localhost:8081 # If fetching files from a web application, update this with your frontend application domain s3: - secured: true - sigV4Enabled: true - upload.directory: upload - upload.expiration: 6 - data.directory: data - # COL-131: Change pre-signed URLs TTL to 1 day max - download.expiration: 1 - - # custom meta property with md5 hash, unused when upload state files are available (default behaviour) + # S3 connection settings + secured: true # Use HTTPS for S3 connections + sigV4Enabled: true # Enable AWS Signature Version 4 for authentication + upload: + directory: upload # Directory for temporary upload files + expiration: 6 # Expiration time for uploads (in hours) + data: + directory: data # Directory for permanent data storage + # Uncomment below to set the customMd5Property property to use a custom MD5 hash metadata # customMd5Property: md5chksum - - #amazon - endpoint: s3-external-1.amazonaws.com - - # an optional override to replace the s3 endpoint, useful to proxy requests - preSignedUrl: + endpoint: s3-external-1.amazonaws.com # S3 endpoint configuration, replace with your actual S3 endpoint + preSignedUrl: # Optional override for S3 pre-signed URL generation override: host: - metadata: - useLegacyMode: false - + useLegacyMode: false # Set to true to use legacy metadata handling bucket: - name.object: oicr.icgc - name.state: oicr.icgc - size.pool: 0 - size.key: 2 - + name: + object: score.data # Bucket name for object storage (update as needed) + state: score.data # Bucket name for state storage (update as needed) + size: + pool: 0 # Size of the connection pool + key: 2 # Size of the key used for encryption object: - sentinel: heliograph - + sentinel: heliograph # Sentinel value for object operations + download: + expiration: 1 # Expiration time for download links (in days) upload: - retry.limit: 5 - partsize: 20000000 - connection.timeout: 15000 - - # Every day at midnight - clean.cron: "0 0 0 * * ?" - clean.enabled: true - + retry: + limit: 5 # Maximum number of retry attempts for uploads + partsize: 20000000 # Size of each part in multipart uploads (in bytes) + connection: + timeout: 15000 # Connection timeout for uploads (in milliseconds) + clean: + cron: "0 0 0 * * ?" # Cron expression for cleanup job (daily at midnight) + enabled: true # Enable or disable the cleanup job auth: - # Connection retries in case of connection failure connection: - # Max number of retries - maxRetries: 5 - - # Initial timeoutMs before the first retry. In milliseconds. - initialBackoff: 15000 - - # Multiplier that defines value of consequent timeouts before the next retry. - # E.g. TIMEOUT(n) = TIMEOUT(n-1) * MULTIPLIER - multiplier: 2.0 - -#allowedOrigins can be configured to contain multiple values, all separated by commas + maxRetries: 5 # Maximum number of connection retries + initialBackoff: 15000 # Initial backoff time before first retry (in milliseconds) + multiplier: 2.0 # Multiplier for subsequent backoff times management: endpoints: web: cors: - allowedOrigins: http://localhost:8081 - -# SpringBoot >=2.6 default strategy for matching the request path has been changed -# from antpathmatcher to pathpatternparser -spring: - mvc: - pathmatch: - matching-strategy: ant_path_matcher - - + allowedOrigins: http://localhost:8081 # Update this with your management console URL(s) logging: level: root: INFO org.springframework.web: INFO +spring: + config: + import: optional:vault:// # Required for Vault integration + cloud: + vault: + # Basic Configuration (Optional) + # host: localhost + # port: 8200 + # scheme: https + + # Authentication (Choose ONE method) + + # Method 1: Token Authentication + # authentication: TOKEN + # token: your-vault-token + + # Method 2: AppRole Authentication + # authentication: APPROLE + # app-role: + # role-id: your-role-id + # secret-id: your-secret-id + # app-auth-path: approle + + # Connection Timeouts (Optional) + # connection-timeout: 5000 + # read-timeout: 15000 + mvc: + pathmatch: + matching-strategy: ant_path_matcher # Use Ant-style path matching --- ############################################################################### # Profile - "ssl" -# this is the configuration for the service using the self-signed cert created -# for initial production deployments. key-store-password would still need to -# be specified in the properties file +# Configuration for using a self-signed certificate in production deployments ############################################################################### - spring: config: activate: on-profile: ssl - -# Server server: ssl: key-store-type: JKS - key-store: src/main/cert/service.jks + key-store: src/main/cert/service.jks # Update with your actual keystore path key-alias: object-store-service + # Note: key-store-password should be specified in a separate properties file for security --- ############################################################################### # Profile - "azure" +# Configuration for Azure blob storage ############################################################################### - spring: config: activate: on-profile: azure - azure: endpointProtocol: https - accountName: oicricgc - accountKey: - + accountName: # Add your Azure account name + accountKey: # Add your Azure account key here bucket: - name.object: data - policy.upload: UploadPolicy - policy.download: DownloadPolicy - + name: + object: data + policy: + upload: UploadPolicy + download: DownloadPolicy download: - partsize: 250000000 + partsize: 250000000 # Part size for downloads in Azure (in bytes) --- + ############################################################################### # Profile - "s3" +# Configuration for Amazon S3 or S3-compatible storage ############################################################################### - spring: config: activate: on-profile: s3 - s3: - # Whether the connection should use HTTPS (true) or HTTP (false) - secured: true - - # Endpoint URL for the S3-compatible service - # endpoint: your-s3-endpoint - - # Access key for authentication - # accessKey: your-access-key - - # Secret key for authentication - # secretKey: your-secret-key - - # Master encryption key ID for server-side encryption - # masterEncryptionKeyId: your-encryption-key-id - - # Custom MD5 checksum property (if needed) + secured: false # Set to False for conductor quickstart + endpoint: http://localhsot:9000 + accessKey: admin + secretKey: admin123 # + # masterEncryptionKeyId: your-encryption-key-id # Uncomment for server-side encryption customMd5Property: md5chksum - - # Connection timeout in milliseconds - connectionTimeout: 15000 - - # Retry limit for failed operations + connectionTimeout: 1200000 retryLimit: 5 - - # Whether to use Signature Version 4 sigV4Enabled: true --- ############################################################################### # Profile - "prod" +# Production environment configuration ############################################################################### - spring: config: activate: on-profile: prod - s3: secured: true - -# Metadata server metadata: - url: https://meta.icgc.org + url: https://song.example.com # Update with your actual metadata server URL --- ############################################################################### # Profile - "secure" +# Security configuration for OAuth2 and JWT ############################################################################### - spring: config: activate: @@ -218,84 +207,71 @@ spring: oauth2: resourceserver: jwt: - # EGO public key - public-key-location: "https://localhost:8443/oauth/token/public_key" - # Keycloak JWK - #jwk-set-uri: http://localhost/realms/myrealm/protocol/openid-connect/certs - -# OAuth authentication server + public-key-location: "https://localhost:8180/oauth/token/public_key" # Update with your actual OAuth server URL + jwk-set-uri: http://keycloak:8180/realms/myrealm/protocol/openid-connect/certs auth: server: - # check API Key endpoint - url: https://localhost:8443/oauth/check_token + url: http://localhost:8180/realms/myrealm/apikey/check_api_key/ # Update with your actual OAuth server URL tokenName: apiToken - clientID: score - clientSecret: scoresecret - # Define a valid auth provider: ego or keycloak - provider: ego - # Keycloak config + clientID: dms # Update with your actual client ID + clientSecret: t016kqXfI648ORoIP5gepqCzqtsRjlcc # Update with your actual client secret + provider: keycloak # Valid options: ego or keycloak keycloak: - host: http://localhost - realm: "myrealm" + host: http://localhost:8180 # Update with your Keycloak host if using Keycloak + realm: "myrealm" # Update with your Keycloak realm if using Keycloak scope: download: system: score.READ study: - prefix: PROGRAMDATA- + prefix: STUDY. suffix: .READ upload: system: score.WRITE study: - prefix: PROGRAMDATA- + prefix: STUDY. suffix: .WRITE --- ############################################################################### # Profile - "dev" +# Development environment configuration ############################################################################### - spring: config: activate: on-profile: dev - s3: secured: false - endpoint: http://localhost:8085 - accessKey: minio - secretKey: minio123 - -# Server + endpoint: http://localhost:9000 # Update with your local S3 endpoint + accessKey: admin # Update with your local access key + secretKey: admin123 # Update with your local secret key server: - port: 8087 - + port: 8087 # Development server port bucket: - name.object: test.icgc.test - name.state: test.icgc.test - + name: + object: object # Test bucket for object storage + state: state # Test bucket for state storage upload: - clean.enabled: false - + clean: + enabled: false # Disable cleanup in development metadata: - url: http://localhost:8080 + url: http://localhost:8080 # Local metadata server URL --- ############################################################################### # Profile - "benchmark" +# Configuration for benchmarking purposes ############################################################################### - spring: config: activate: on-profile: benchmark - -# Server server: ssl: key-store-type: JKS - s3: secured: false - endpoint: + endpoint: # Add your benchmark S3 endpoint here + \ No newline at end of file