Skip to content
New issue

Have a question about this project?Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of serviceand privacy statement.We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development Keys #8378

Draft
wants to merge 19 commits into
base: 1.6.x
Choose a base branch
from
Draft

Development Keys #8378

wants to merge 19 commits into from

Conversation

lohanidamodar
Copy link
Member

@lohanidamodar lohanidamodar commented Jul 10, 2024

What does this PR do?

(Provide a description of what this PR does and why it's needed.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)

Related PRs and Issues

  • (Related PR or issue)

Checklist

  • Have you read theContributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@lohanidamodar lohanidamodar changed the title development keys module setup Development Keys Jul 29, 2024
@@ -292,6 +292,37 @@
}
}
}
} elseif($keyType === API_KEY_TEST) {
var_dump('keys matches test');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

leftover

Comment on lines 316 to 317
Authorization::setRole(Auth::USER_ROLE_ADMIN);
Authorization::setDefaultStatus(false); // Cancel security segmentation for API keys.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Im not sure what development keys are for. Are they like API keys but for Console user - giving access to all project and project/organization actions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Curious, why not just XList?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Do you mean why not justList?Listappears to be a keyword.

'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'name' => 'Key Test',
'expire' => DateTime::addSeconds(new \DateTime(), 36000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Let's expire in 10 seconds. After tests have sleep for 10 seconds, and try to use it to get failure.

Copy link

✨ Benchmark results

  • Requests per second: 1,653
  • Requests with 200 status code: 297,534
  • P99 latency: 0.080620394

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,653 2,075
200 297,534 373,609
P99 0.080620394 0.07684586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants