Commit Graph

80 Commits

Author SHA1 Message Date
2e6eef7654 Add notification get command (#2818)
* Add new command

* lint
2023-02-09 11:30:40 -05:00
a13bb2feb3 Interact with migrations via cli (#2816)
* Interact with migrations via cli

* Move command under notifications
2023-02-08 22:02:40 +00:00
f13f52ab71 Deprecating the job template feature (#2798)
* deprecating the job template feature

* removing the code

* format
2023-02-08 19:21:03 +00:00
d732028201 Add unmanaged nodes integration tests (#2780)
* Add docker file to the runtime tools

* fixes

* bug fixes

* more bug fixes and added doc

* don;t overwrite the RUST_LOG env var

* integration test for unmanaged nodes

* add unamanged parameters to launch()

* add ing object_id

* more bug fixes

* bug fixes

* chmod on the linux files in docker

* format

* cleanup merge

* added test_unmanaged command

* cleanup

* use a single image for the docker compose
remove images after the test

* docs and formatting

* format

* format

* format and bug fixes

* using windows server

* fix linux container
make the base image a paramter on windows
use the windows server base image on  windows server

* format

* bug fix

* more fixes

* allow reboot

* more fixes

* added more logging around the service principal creation

* format

* more logging

* change restart policy

* fix multi tenant domain

* more fixes

* exit instead of reboot when running inside docker

* remove comment

* build fix

* try_exist instead of exist

* save the docker logs

* bug_fix

* adding timeout

* fix timeout logic

* adding a build profile

* make all agent depend on the first one

* remove profile

* another fix

* restart agent 1

* Update docs/unmnaged-nodes.md

Co-authored-by: Teo Voinea <58236992+tevoinea@users.noreply.github.com>

---------

Co-authored-by: Teo Voinea <58236992+tevoinea@users.noreply.github.com>
2023-02-08 11:07:19 -08:00
f93c75556d Resolving bug in config refactor. (#2811)
* Resolving bug in config refactor.

* fixing isort.

* Reformatting api.

* debugging.

* fixing backend.

* Adding condition to param retrieval.

* Adding back save.

* Fixing condition check.

* Formatting.
2023-02-07 18:13:29 -08:00
c1f6dfc366 Validate scriban from cli (#2800)
* Add validate scriban endpoint to cli

* missed a file

* Lint -- I miss C#

* docs
2023-02-06 08:32:49 -05:00
291f9dfbcf Fix query to get he existing proxy (#2791) 2023-02-01 20:49:14 +00:00
f402304084 Config Refactor Round 2. (#2771)
* Config Refactor Round 2.

* Adding docs.

* Fix file formatting.

* Removing.

* fixing imports.

* Removing.

* Fixing cli access token retrieval.

* Fixing authority check.

* Small edits.

* Removing duplicate.

* Adding uuid check.

* Possible to override with existing params.

* Allowing flags to override storage.

* Trying to fix config params.?

* Fixing.

* Set endpoint params via app function.

* Checking changes to params.

* Make tenant_domain default.

* Remove endoint params from models.

* UPdating docs.

* Setting

* Removing hardcoded values.

* Typo.

* Removing endpoint upload.

* Typo.

* Fixing typos.

* Fix error message about aad tenant.

* Responding to comments.

* Update src/ApiService/ApiService/UserCredentials.cs

Co-authored-by: Marc Greisen <mgreisen@microsoft.com>

---------

Co-authored-by: Marc Greisen <mgreisen@microsoft.com>
2023-01-31 15:03:38 -08:00
0fb8bc4a86 Bug fixes and documentation (#2694) 2022-12-15 19:39:17 -08:00
4c1adb6e96 rename client_id in pool to object_id (#2673)
* rename client_id in pool to object_id

* fix tests

* print out the content body when receiving an error response in the agent

* fix test

* Apply suggestions from code review

* Update src/ApiService/ApiService/Functions/AgentRegistration.cs

* format

* cleanup

* format

* address pr comment
2022-12-13 03:39:49 +00:00
e0634a3365 Deploy update (#2650)
* Remove Python App Function Deployment Code and  Code.

* Updating yml and zip names.

* Fixing ci.yml.

* Typo.

* Format

* Trying to remove python service.

* Updating directories.

* Removing flag.

* Format.

* Fixng api-service-net ref.

* Re-add requirement.

* Fixing refs in bicep.

* Specifying version.

* Removing dotnet refs in integration tests.

* Updating role assignment naming convention.

* Adding ignore.

* Update src/deny.toml

Co-authored-by: George Pollard <porges@porg.es>

* Update version.

* Removing onefuzztypes dependency.

* Switch app service plan to windows.

* Update test version.

* Changing version.

* Returning version.

* Trying to add onefuzz types back.

* Force pipenv version.

* Fix.

* Syntax.

* Renaming.

* Trying different version.

* Removing build step.

* Fixing bicep parameter.

* Retrying run with older version.

* Trying pipenv with another version.

* Forcing pipenv version in tox.

* Adding pipenv fix and updating version.

Co-authored-by: George Pollard <porges@porg.es>
2022-11-23 17:48:30 -08:00
1f46388e6d Bug fixes related to the unmanaged nodes (#2632)
* bug fixes related to the unmanaged nodes
- fix the token request in the client
- adding a is_unmnaged field to the agentConfig
- fix typo in the appId claim type
- fix typo in the UnmanagedNode claim value
- fix query PoolOperation.GetByClientId

* remove unused import

* build fix

* change unmanaged  field to managed

* Apply suggestions from code review

Co-authored-by: Teo Voinea <58236992+tevoinea@users.noreply.github.com>

Co-authored-by: Teo Voinea <58236992+tevoinea@users.noreply.github.com>
2022-11-17 20:51:52 +00:00
40c85b8c16 Make the --container_type parameter required (#2631)
* Make --container_type a required parameter (#2574)

* Fix targetUrl so it no longer contains full exe path

* Make --container_type a required parameter (#2574)
2022-11-16 11:38:42 -08:00
ff85b808e9 Adding an optional retry_limit to onefuzz debug connect (#2609)
* adding an optional retry_limit to onefuzz debug connect

* make none the default retry limit

* fix logic

* fix default
2022-11-10 01:51:35 +00:00
7e9ff9cd11 Add endpoint to download the agent binaries (#2600)
* Add endpoint to download the agent binaries

* build fix

* fix types

* adding test

* format

* remove comments

* address pr comment

* build fix
2022-11-07 15:28:22 -08:00
ee0cbd70a0 Enable dotnet fuzzing (#2273)
Add a new CLI job template, `libfuzzer dotnet_dll`, and supporting server-side definitions.
2022-10-19 14:17:27 -07:00
3f35d81f4b Adding New Default Image Config Value to IC. (#2434)
* Adding New Default Image Config Value to IC.

* Removing forced image setting.

* Updating Webhook Events.

* Removing typo.

* Updating webhook_events again.

* Syncing webhook events.

* Fixing check for os type.

* Fixing import.

* PR Suggestions.

* Fix C# Model Typo.

* Removing other refs to images.

* Removing remaining refs to images outside of models.

* Removing hardcoded image values from tests.

* Update Default Proxy and Repro Images.

Co-authored-by: Marc Greisen <mgreisen@microsoft.com>
2022-09-23 10:40:44 -07:00
ef7b557599 Add debug command to download a task’s containers (#2359) 2022-09-09 00:45:15 +00:00
dcb706fa6a Changing CLI Scaleset size parameter to max_size. (#2293)
* Changing size parameter to max_size.

* Adding default param for clarity.

* FIxing param

* Setting size to 1.

* Adding comment.

* Trailing white spaces.

* Adding initialized_size param.

* Using initialized_at.

* Changing variable name.
2022-08-26 09:57:51 -07:00
15d92cad52 Retry on "No connection could be made because target machine actively… (#2252)
* Retry on "No connection could be made because target machine actively refused it" when connecting debugger using create_and_connect command

* limit number of retries

Co-authored-by: stas <statis@microsoft.com>
2022-08-15 09:24:26 -07:00
ceb5d6d5f9 Update Default Windows Image (#2226)
* Update Function Scaling Policy and Diagnostic Settings.

* Adding changes to scaling policy

* UPdating cooldown.

* Changing time windows.

* Updating duration.

* Updating Out-of-Date Windows Image.

* Adding repro operations back.

* Removing bad files.
2022-08-08 11:40:55 -07:00
992751044f Make the dotnet endpoint and functions configurable in the cli (#2190) 2022-07-25 22:12:36 +00:00
08fb29fc6b ignore the state when a job_id is specified in tasks list (#2171) 2022-07-21 18:25:39 +00:00
d71c558447 allow and set onefuzz cli autoscale min value default to zero (#2112) 2022-07-13 08:59:03 -07:00
3878793147 Trim whitespaces from options passed to executables (#2151)
* Trim whitespaces from options passed to executables

* check for None

* refactor to a function
2022-07-11 23:37:48 +00:00
52ccf05a29 Remove deprecated libfuzzer_coverage task (#2021)
- Remove the ability to create or execute a `libfuzzer_coverage` task
- Preserve the enum variant in `onefuzztypes` to prevent errors when deserializing old data
- Remove doc references to `libfuzzer_coverage`
2022-06-13 12:38:35 -07:00
f8ba6e2d5b Specify that the tools are missing locally, not on the repro vm (#2036) 2022-06-09 20:04:08 +00:00
806409bdbf Warn on SDK/CLI creation of libfuzzer_coverage task (#1944)
The old `libfuzzer_coverage` task dumps binary sancov tables. Its output is not usable on its own. This task has been superseded by the generic `coverage` task (which produces actual modoffset and source line coverage).

Add a CLI warning if it is used, in preparation for removing it.
2022-05-14 12:03:09 -07:00
25405b0b27 Remove client_secret from config, add env var (#1918) 2022-05-09 16:58:15 -07:00
424ffdb4b5 Adding auto scale via cli (#1717)
* Initial implementation for adding auto scale via cli

* Remove unused argument

* Remove unused import

* I had a 👻extra line👻
2022-03-29 09:50:07 -04:00
77dcd57b46 Add EventGrid compatible webhook format (#1640) 2022-02-11 16:39:19 -08:00
1de2cc841d Check-pr creates and uses SP. (#1504)
* Check-pr creates and uses SP.

* flake8.

* flake8.

* Fixing var name.

* Fixing deploy.py

* Looking for client_secret

* Change to check_output.

* mypy fix.

* Fixing check-pr

* working version.

* lint

* Updating arg text.

* Removing redundant functionality.

* Changing register codepath and adding flag.

* Removing pycache file.

* Fixing unattended flag.

* Adding space.

* Fixing a few calls.

* Removing file.

* Removing python3.

* Removing old file.

* Adding wait into registration.py

* Formatting registration.py.

* Removing space.

* Adding retry logic to check-pr.

* Formatting.

* Retriggering.

* Retriggering.

* Calling sp_create and adding retry to authorize.

* Fixing syntax.

* Removing comments.

* Adding another retry.

* Retriggering.

* Retriggering.

* Retriggering.

* Trying to find error.

* Adding retry logic.

* Increasing sleep.

* Fixing formatting.

* Retriggering.

* Removing bad file.

* Trying out retry for logger.

* typevar issue?

* Re-adding.

* Retriggering.

* retriggering.

* Retriggering.

Co-authored-by: nharper285 <nharper285@gmail.com>
Co-authored-by: Cheick Keita <kcheick@gmail.com>
2021-12-17 09:44:04 -08:00
7cabc6b924 Remove generic reset command (#1511)
* Remove generic reset command

Remove ability to reset containers by type.
Work item #1508

* Test to see if we are getting timeouts when attempting to get a queue message.

* Remove exception handling for timeout.
2021-12-13 17:21:39 -08:00
d3bcbea980 Increase default level of feedback/confirmation in destructive commands #1264 (#1283)
Co-authored-by: stas <statis@microsoft.com>
2021-09-27 09:59:56 -07:00
065272191e Replace notifications by default (#1084) 2021-07-20 18:39:31 -04:00
29dda54b83 instance wide configuration (#1010)
TODO:
* [x] add setting initial set of admins during deployment
2021-06-30 21:13:58 +00:00
2c72bd590f Add generic coverage task (#763)
**Todo:**
- [x] Finalize format for coverage file(s)
- [x] Add service support
- [x] Integration test
- [x] Merge #926 
- [x] Merge #929
2021-06-03 23:36:00 +00:00
c46abbcec3 stabilize onefuzz jobs containers download (#953) 2021-06-02 13:29:20 -04:00
1822acf943 add onefuzz jobs containers delete JOB_ID (#949)
Addresses #943
2021-06-02 17:04:51 +00:00
7952f16032 basic list proxy functionality (#905) 2021-05-24 13:24:22 -04:00
776e8fa909 Add setup arguments to enable specifying alt tenants on the CLI (#900)
This enables specifying the endpoint configuration for alternate tenants purely on the command line.

Previously, on a single tenant you could use the following:
```
onefuzz --endpoint https://INSTANCE.azurewebsites.net info get
```

For multi-tenant installs, we need to expose more than just endpoint.

This enables:
```
onefuzz --endpoint https://INSTANCE.azurewebsites.net --client_id CLIENT_ID  --authority https://login.microsoftonline.com/common --tenant_domain TENANT_DOMAIN info get
```
2021-05-19 07:38:34 +00:00
358d85ef82 fix cli client registration (#825)
- The CLIClient approle was not assigned to the cli registration created byt he registration.py script
2021-04-26 20:35:34 +00:00
cf3d904940 address formatting from black 21.4b0 (#831) 2021-04-26 12:35:16 -04:00
624a7f77e8 set ephemeral disks off by default (#761) 2021-04-01 16:26:17 -04:00
3096f99e86 enable using ephemeral disks by default (#461) 2021-03-30 18:48:44 -04:00
516b1e000e expose minimized_stack_depth functionality in the CLI/API (#715) 2021-03-23 10:09:34 -04:00
14b295f337 add privacy statement to CLI (#695) 2021-03-19 12:52:37 -04:00
6e60a8cf10 add regression testing tasks (#664) 2021-03-18 15:37:19 -04:00
bc6c8408c4 add onefuzz containers files download_dir (#598)
fixes #571
2021-02-26 15:27:51 +00:00
1d74379a70 use the primitive types in more places (#514) 2021-02-05 13:10:37 -05:00