You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/models/migrations
M Hickford 191a74d622
Record OAuth client type at registration (#21316)
The OAuth spec [defines two types of
client](https://datatracker.ietf.org/doc/html/rfc6749#section-2.1),
confidential and public. Previously Gitea assumed all clients to be
confidential.

> OAuth defines two client types, based on their ability to authenticate
securely with the authorization server (i.e., ability to
>   maintain the confidentiality of their client credentials):
>
>   confidential
> Clients capable of maintaining the confidentiality of their
credentials (e.g., client implemented on a secure server with
> restricted access to the client credentials), or capable of secure
client authentication using other means.
>
>   **public
> Clients incapable of maintaining the confidentiality of their
credentials (e.g., clients executing on the device used by the resource
owner, such as an installed native application or a web browser-based
application), and incapable of secure client authentication via any
other means.**
>
> The client type designation is based on the authorization server's
definition of secure authentication and its acceptable exposure levels
of client credentials. The authorization server SHOULD NOT make
assumptions about the client type.

 https://datatracker.ietf.org/doc/html/rfc8252#section-8.4

> Authorization servers MUST record the client type in the client
registration details in order to identify and process requests
accordingly.

Require PKCE for public clients:
https://datatracker.ietf.org/doc/html/rfc8252#section-8.1

> Authorization servers SHOULD reject authorization requests from native
apps that don't use PKCE by returning an error message

Fixes #21299

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
..
fixtures Record OAuth client type at registration (#21316) 2 years ago
migrations.go Record OAuth client type at registration (#21316) 2 years ago
migrations_test.go Kd/ci playwright go test (#20123) 2 years ago
testlogger_test.go Kd/ci playwright go test (#20123) 2 years ago
v70.go chore(models): rewrite code format. (#14754) 4 years ago
v71.go Use base32 for 2FA scratch token (#18384) 3 years ago
v72.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v73.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v74.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v75.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v76.go chore(models): rewrite code format. (#14754) 4 years ago
v77.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v78.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v79.go chore(models): rewrite code format. (#14754) 4 years ago
v80.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v81.go Upgrade xorm to v1.0.0 (#10646) 5 years ago
v82.go Make git.OpenRepository accept Context (#19260) 3 years ago
v83.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v84.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v85.go Use base32 for 2FA scratch token (#18384) 3 years ago
v86.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v87.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v88.go chore(models): rewrite code format. (#14754) 4 years ago
v89.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v90.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v91.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v92.go chore(models): rewrite code format. (#14754) 4 years ago
v93.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v94.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v95.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v96.go chore(models): rewrite code format. (#14754) 4 years ago
v97.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v98.go Upgrade xorm to v0.8.0 (#8536) 5 years ago
v99.go Migrations (v82,v96,v99,v136) remove dependencies (#12286) 5 years ago
v100.go chore(models): rewrite code format. (#14754) 4 years ago
v101.go Allow more than 255 characters for tokens in external_login_user table (#8554) 5 years ago
v102.go Use transaction in V102 migration (#12395) 5 years ago
v103.go Allow Protected Branches to Whitelist Deploy Keys (#8483) 5 years ago
v104.go chore(models): rewrite code format. (#14754) 4 years ago
v105.go chore(models): rewrite code format. (#14754) 4 years ago
v106.go Auto-subscribe user to repository when they commit/tag to it (#7657) 5 years ago
v107.go chore(models): rewrite code format. (#14754) 4 years ago
v108.go Improve notification (#8835) 5 years ago
v109.go Team permission to create repository in organization (#8312) 5 years ago
v110.go Upgrade xorm to v1.0.0 (#10646) 5 years ago
v111.go Move issues related files into models/issues (#19931) 3 years ago
v112.go Add a storage layer for attachments (#11387) 5 years ago
v113.go Change target branch for pull request (#6488) 5 years ago
v114.go chore(models): rewrite code format. (#14754) 4 years ago
v115.go Add generic set type (#21408) 2 years ago
v116.go chore(models): rewrite code format. (#14754) 4 years ago
v117.go Add branch protection option to block merge on requested changes. (#9592) 5 years ago
v118.go Mark PR reviews as stale at push and allow to dismiss stale approvals (#9532) 5 years ago
v119.go Refactor: Remove Dependencys from Migration v112-v119 (#11811) 5 years ago
v120.go Add owner_name column for table repository for maintaince reason (#9717) 5 years ago
v121.go Restricted users (#6274) 5 years ago
v122.go chore(models): rewrite code format. (#14754) 4 years ago
v123.go Migrate reactions when migrating repository from github (#9599) 5 years ago
v124.go chore(models): rewrite code format. (#14754) 4 years ago
v125.go Migrate reviews when migrating repository from github (#9463) 5 years ago
v126.go Update topics repo count when deleting repository (#10051) 5 years ago
v127.go Language statistics bar for repositories (#8037) 5 years ago
v128.go Refactor git command arguments and make all arguments to be safe to be used (#21535) 2 years ago
v129.go chore(models): rewrite code format. (#14754) 4 years ago
v130.go Add an abstract json layout to make it's easier to change json library (#16528) 4 years ago
v131.go System-wide webhooks (#10546) 5 years ago
v132.go Allow to set protected file patterns that can not be changed under no conditions (#10806) 5 years ago
v133.go make avatar lookup occur at image request (#10540) 5 years ago
v134.go Refactor git command arguments and make all arguments to be safe to be used (#21535) 2 years ago
v135.go Add Organization Wide Labels (#10814) 5 years ago
v136.go Propagate context and ensure git commands run in request context (#17868) 3 years ago
v137.go Prevent merge of outdated PRs on protected branches (#11012) 5 years ago
v138.go Add a way to mark Conversation (code comment) resolved (#11037) 5 years ago
v139.go Fix issue ref migration (#11419) 5 years ago
v140.go Change language statistics to save size instead of percentage (#11681) 5 years ago
v141.go Fix migration v141 (#14387) 4 years ago
v142.go A better go code formatter, and now `make fmt` can run in Windows (#17684) 3 years ago
v143.go Add more linters to improve code readability (#19989) 3 years ago
v144.go A better go code formatter, and now `make fmt` can run in Windows (#17684) 3 years ago
v145.go Fix Migration 145 on MSSQL if varchar is changed to nvarchar (#12445) 5 years ago
v146.go chore(models): rewrite code format. (#14754) 4 years ago
v147.go Fix various documentation, user-facing, and source comment typos (#16367) 4 years ago
v148.go [BugFix] Fix comment broken issue ref dependence (#12651) 4 years ago
v149.go Add Created & Updated to Milestone (#12662) 4 years ago
v150.go Add Primary Key to Topic and RepoTopic (#12639) 4 years ago
v151.go Fix order by parameter (#19849) 3 years ago
v152.go Add configurable Trust Models (#11712) 4 years ago
v153.go Add team support for review request (#12039) 4 years ago
v154.go Use neutral language in comments and docs (#20135) 3 years ago
v155.go [Enhancement] Allow admin to merge pr with protected file changes (#12078) 4 years ago
v156.go Make git.OpenRepository accept Context (#19260) 3 years ago
v157.go chore(models): rewrite code format. (#14754) 4 years ago
v158.go chore(models): rewrite code format. (#14754) 4 years ago
v159.go Include OriginalAuthor in Reaction constraint (#13505) 4 years ago
v160.go Add block on official review requests branch protection (#13705) 4 years ago
v161.go Fix database keyword quote problem on migration v161 (#17522) 3 years ago
v162.go Add support for corporate WeChat webhooks (#15910) 4 years ago
v163.go Change topic name size from 25 to 50 (#14150) 4 years ago
v164.go Minimal OpenID Connect implementation (#14139) 4 years ago
v165.go Fix order by parameter (#19849) 3 years ago
v166.go Remove unused commit (#14741) 4 years ago
v167.go Redirect on changed user and org name (#11649) 4 years ago
v168.go noop (#14521) 4 years ago
v169.go Use OldRef instead of CommitSHA for DeleteBranch comments (#14604) 4 years ago
v170.go Add dismiss review feature (#12674) 4 years ago
v171.go Add v171 (addSortingColToProjectBoard) migration for #14634 (#14652) 4 years ago
v172.go v172 migration adds created_unix field instead of expiry (#15458) 4 years ago
v173.go Add UI to delete tracked times (#14100) 4 years ago
v174.go Delete Labels & IssueLabels on Repo Delete too (#15039) 4 years ago
v175.go A better go code formatter, and now `make fmt` can run in Windows (#17684) 3 years ago
v176.go Create Proper Migration Tests (#15116) 4 years ago
v176_test.go format with gofumpt (#18184) 3 years ago
v177.go Create Proper Migration Tests (#15116) 4 years ago
v177_test.go format with gofumpt (#18184) 3 years ago
v178.go Add LFS Migration and Mirror (#14726) 4 years ago
v179.go Fix order by parameter (#19849) 3 years ago
v180.go Add more linters to improve code readability (#19989) 3 years ago
v181.go Rework repository archive (#14723) 4 years ago
v181_test.go format with gofumpt (#18184) 3 years ago
v182.go Add primary_key to issue_index (#16813) 4 years ago
v182_test.go format with gofumpt (#18184) 3 years ago
v183.go Add push to remote mirror repository (#15157) 4 years ago
v184.go Check if column exist before rename if exist, just return with no error (#17870) 3 years ago
v185.go Rework repository archive (#14723) 4 years ago
v186.go Add tag protection (#15629) 4 years ago
v187.go Refactor Webhook + Add X-Hub-Signature (#16176) 4 years ago
v188.go Add option to provide signature for a token to verify key ownership (#14054) 4 years ago
v189.go Add more linters to improve code readability (#19989) 3 years ago
v189_test.go format with gofumpt (#18184) 3 years ago
v190.go Add agit flow support in gitea (#14295) 4 years ago
v191.go format with gofumpt (#18184) 3 years ago
v192.go Add primary_key to issue_index (#16813) 4 years ago
v193.go Add repo_id for attachment (#16958) 3 years ago
v193_test.go Add repo_id for attachment (#16958) 3 years ago
v194.go Support unprotected file patterns (#16395) 3 years ago
v195.go Fix commit status index problem (#17061) 3 years ago
v195_test.go format with gofumpt (#18184) 3 years ago
v196.go Kanban colored boards (#16647) 3 years ago
v197.go Add a simple way to rename branch like gh (#15870) 3 years ago
v198.go Save and view issue/comment content history (#16909) 3 years ago
v199.go Refix indices on actions table (#20158) 3 years ago
v200.go Sync gitea app path for git hooks and authorized keys when starting (#17335) 3 years ago
v201.go Refactor update checker to use AppState (#17387) 3 years ago
v202.go Add support for ssh commit signing (#17743) 3 years ago
v203.go Support sorting for project board issuses (#17152) 3 years ago
v204.go Migration 204 use Sync2 (#18044) 3 years ago
v205.go Fix order by parameter (#19849) 3 years ago
v206.go Team permission allow different unit has different permission (#17811) 3 years ago
v207.go Attempt to fix the webauthn migration again - part 3 (#18770) 3 years ago
v208.go Attempt to fix the webauthn migration again - part 3 (#18770) 3 years ago
v209.go Attempt to fix the webauthn migration again - part 3 (#18770) 3 years ago
v210.go Update the webauthn_credential_id_sequence in Postgres (#19048) 3 years ago
v210_test.go Lock gofumpt to v0.3.0 and run it (#18866) 3 years ago
v211.go Store the foreign ID of issues during migration (#18446) 3 years ago
v212.go Add Package Registry (#16510) 3 years ago
v213.go Add "Allow edits from maintainer" feature (#18002) 3 years ago
v214.go Auto merge pull requests when all checks succeeded via API (#9307) 3 years ago
v215.go Delete related PullAutoMerge and ReviewState on User/Repo Deletion (#19649) 3 years ago
v216.go Refix indices on actions table (#20158) 3 years ago
v217.go Alter hook_task TEXT fields to LONGTEXT (#20038) 3 years ago
v218.go Add another index for Action table on postgres (#21033) 2 years ago
v219.go Fix commit status icon when in subdirectory (#20285) 3 years ago
v220.go Fix v220 migration to be compatible for MSSQL 2008 r2 (#20702) 3 years ago
v221.go WebAuthn CredentialID field needs to be increased in size (#20530) 3 years ago
v221_test.go WebAuthn CredentialID field needs to be increased in size (#20530) 3 years ago
v222.go WebAuthn CredentialID field needs to be increased in size (#20530) 3 years ago
v223.go WebAuthn CredentialID field needs to be increased in size (#20530) 3 years ago
v224.go Increase Content field size of gpg_key and public_key to MEDIUMTEXT (#20896) 3 years ago
v225.go Increase Content field size of gpg_key and public_key to MEDIUMTEXT (#20896) 3 years ago
v226.go Set SemverCompatible to false for Conan packages (#21275) 2 years ago
v227.go Add system setting table with cache and also add cache supports for user setting (#18058) 2 years ago
v228.go Add team member invite by email (#20307) 2 years ago
v229.go Update milestone counters when issue is deleted (#21459) 2 years ago
v229_test.go Update milestone counters when issue is deleted (#21459) 2 years ago
v230.go Record OAuth client type at registration (#21316) 2 years ago
v230_test.go Record OAuth client type at registration (#21316) 2 years ago