I seem to be logged in... but not actually ;) Help!

My Data/Logs/System_Development.log shows the following (below), while my login screen says, “The entered username or password was wrong”. I know the pass is correct since I reset it on cli… any ideas as to what is causing this?

Neos 5.0.6, php 7.1.2, apache2 (no nginx)

18-08-29 17:09:51 1990       DEBUG                          Router route(): Route "Flow :: default with action and format" matched the request "http://###Domain###/flow/neos.neos/login/authenticate (POST)".
18-08-29 17:09:51 1990       DEBUG                          CSRF: No token required, not authenticated
18-08-29 17:09:51 1990       DEBUG                          Session initialization triggered by Neos\Flow\Mvc\FlashMessageContainer->addMessage.
18-08-29 17:09:51 1990       INFO                           Session: Started session with id t8aWMnK1KgJevPgctWKOSzrHC3pwxRfH.

Also… this is the result of ###Domain###/flow/

Could not authenticate any token.

Might be missing or wrong credentials or no authentication provider matched.
Evaluated following 1 privilege target(s):
"Neos.Neos:AllControllerActions": ABSTAIN
(0 granted, 0 denied, 1 abstained)
Exception Code	1222204027
Exception Type	Neos\Flow\Security\Exception\NoTokensAuthenticatedException
Log Reference	201808291724118d7e6c
Thrown in File	Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Flow_Security_Authorization_Interceptor_PolicyEnforcement.php
Line	104
Original File	Packages/Framework/Neos.Flow/Classes/Security/Authorization/Interceptor/PolicyEnforcement.php

Hahah… so I decided to reinstall, and did… but now I cannot even login to /setup.

Looks like the system is tripping on database login credentials, but setup is where I am supposed to provide those credentials… not sure what to think.

admin@metal:~/web/domain.com/public_html/Neos$ tail -f Data/Logs/S*
==> Data/Logs/Security_Development.log <==

==> Data/Logs/System_Development.log <==
18-08-29 21:46:24 2000       DEBUG                          Router route(): Route "Login" matched the request "https://domain.com/setup/login/authenticate (POST)".

==> Data/Logs/Security_Development.log <==
18-08-29 21:46:25 2000       73.26.46.113   NOTICE                         Successfully authenticated token: Password token
    [array] => 
        packageKey:
        [string] => Neos.Flow
        className:
        [string] => Neos\Flow\Security\Authentication\Provider\FileBasedSimpleKeyProvider
        methodName:
        [string] => authenticate



==> Data/Logs/System_Development.log <==
18-08-29 21:46:25 2000       INFO                           Session: Started session with id U3siCUdPLedk2YBwHvky7gfZSJXCCyDQ.
18-08-29 21:46:25 2000       DEBUG                          CSRF: No token required, method Neos\Setup\Controller\LoginController::authenticateAction() is tagged with a "skipcsrfprotection" annotation
18-08-29 21:46:25 2000       ERROR                          Exception in line 184 of /home/admin/web/domain.com/public_html/Neos/Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO) - See also: 201808292146226f0f5f.txt
18-08-29 21:46:27 2008       DEBUG                          Router route(): Route "Setup" matched the request "https://domain.com/setup/index?step=0 (GET)".
18-08-29 21:46:27 2008       DEBUG                          CSRF: No token required, safe request

==> Data/Logs/Security_Development.log <==
18-08-29 21:46:27 2008       73.26.46.113   INFO                           Redirecting to authentication entry point
    [array] => 
        uri:
        [string] => setup/login



==> Data/Logs/System_Development.log <==
18-08-29 21:46:27 2008       DEBUG                          Session initialization triggered by Neos\Flow\Security\Context->setInterceptedRequest.
18-08-29 21:46:27 2008       INFO                           Session: Started session with id MeUMkvEcIbFfbwVeIMACgQiSdlDUSIZW.
18-08-29 21:46:30 2001       DEBUG                          Router route(): A cached Route with the cache identifier "fe01c5f7e107d8e4cb0aeed86cb5f1bc" matched the request "https://domain.com/setup/login (GET)".
18-08-29 21:46:30 2001       DEBUG                          CSRF: No token required, safe request
18-08-29 21:46:30 2001       ERROR                          Exception in line 184 of /home/admin/web/domain.com/public_html/Neos/Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO) - See also: 20180829214628341843.txt

Do you have any other authenticationProviders configured (maybe via some 3rd party package)?

What is ###DOMAIN###/flow/ supposed to point to?

sry that was just me trying to scrub personalized data… it would be https://domain.com/flow

I have more time to work on this today, and feel it has to be my environment. I will tell you how I solve this…

Ok then, what is https://domain.com/flow supposed to point to then? did you mean /neos?

Who knows… just truncated some frontend url… but:

Just now I cleared all the cache, and deleted all the data in the log files, then went to the login url. Logs look fine. As expected.

I reset password in cli, just to make sure. Login fails with wrong password. Logs show:

18-08-30 16:29:04 3057       DEBUG                          Session: Resumed session with id l6YUQssWP9JKSuQfzXH4NEknKFD2twS9 which was inactive for 4 minutes. (281s)
18-08-30 16:29:04 3057       DEBUG                          Router route(): Route "Flow :: default with action and format" matched the request "https://domain.com/flow/neos.neos/login/authenticate (POST)".

==> Data/Logs/Security_Development.log <==
18-08-30 16:29:04 3057       73.26.46.113   INFO                           Session l6YUQssWP9JKSuQfzXH4NEknKFD2twS9 contains auth token Neos\Flow\Security\Authentication\Token\PasswordToken for provider Neos.Setup:Login. Status: no credentials given
18-08-30 16:29:04 3057       73.26.46.113   INFO                           Session l6YUQssWP9JKSuQfzXH4NEknKFD2twS9 contains auth token Neos\Flow\Security\Authentication\Token\UsernamePassword for provider Neos.Neos:Backend. Status: no credentials given
18-08-30 16:29:04 3057       73.26.46.113   INFO                           Session l6YUQssWP9JKSuQfzXH4NEknKFD2twS9 contains auth token Neos\Flow\Security\Authentication\Token\UsernamePassword for provider Flowpack.Neos.FrontendLogin:Frontend. Status: no credentials given
18-08-30 16:29:04 3057       73.26.46.113   WARNING                        Wrong credentials given for token: Username: "optryc"
    [array] => 
        packageKey:
        [string] => Neos.Flow
        className:
        [string] => Neos\Flow\Security\Authentication\Provider\PersistedUsernamePasswordProvider
        methodName:
        [string] => authenticate



==> Data/Logs/System_Development.log <==
18-08-30 16:29:04 3057       DEBUG                          CSRF: No token required, not authenticated

What version is this and do you block cookies?

Latest… I think 4.0.1? Block cookies: no.

Can you give us the output of composer show (you can remove or obfuscate your package name in there)

behat/transliterator                 v1.2.0             String transliterator
doctrine/annotations                 v1.6.0             Docblock Annotations Parser
doctrine/cache                       v1.8.0             Caching library offering an object-oriented API for many cache backends
doctrine/collections                 v1.5.0             Collections Abstraction library
doctrine/common                      v2.7.3             Common Library for Doctrine projects
doctrine/dbal                        v2.7.2             Database Abstraction Layer
doctrine/inflector                   v1.3.0             Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator                1.1.0              A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                       v1.0.1             Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations                  v1.6.2             Database Schema migrations using Doctrine DBAL
doctrine/orm                         v2.6.2             Object-Relational-Mapper for PHP
flowpack/neos-frontendlogin          3.0.3              Neos plugin demonstrating a simple frontend login
gedmo/doctrine-extensions            v2.4.36            Doctrine2 behavioral extensions
imagine/imagine                      v0.7.1             Image processing for PHP 5.3
mikey179/vfsStream                   v1.6.5             Virtual file system to mock the real file system in unit tests.
myclabs/deep-copy                    1.8.1              Create deep copies (clones) of your objects
neos/behat                           dev-master 0b7c4f6 Behat support package for Neos Flow
neos/buildessentials                 4.1.1              Neos Flow Build Toolchain Essentials
neos/cache                           5.0.6              Neos Cache Framework
neos/composer-plugin                 2.0.1              Flow Composer Plugin
neos/content-repository              4.0.7              Content repository based on Flow, specifically made for Neos.
neos/demo                            4.0.7              Site package for the Neos Demo Site
neos/diff                            4.0.7              This is a comprehensive library for generating differences between two strings or arrays
neos/eel                             5.0.6              The Embedded Expression Language (Eel) is a building block for creating Domain Specific Languages
neos/error-messages                  5.0.6              Flow error messages
neos/flow                            5.0.6              Flow Application Framework
neos/flow-log                        5.0.6              Flow Framework Logger
neos/fluid-adaptor                   5.0.6              Fluid Templating Framework Adaptor
neos/form                            4.1.4              Extensible and flexible API for building web forms
neos/fusion                          4.0.7              Fusion is a hierarchical, prototype based processing language
neos/imagine                         3.0.5             
neos/kickstarter                     5.0.6              A simple generator for controller and views.
neos/media                           4.0.7              The Media package
neos/media-browser                   4.0.7              This module allows managing of media assets including pictures, videos, audio and documents.
neos/neos                            4.0.7              An open source Content Application Platform based on Flow. A set of core Content Management fea...
neos/neos-ui                         1.1.2              NEOS CMS UI rewritten in React
neos/neos-ui-compiled                1.1.2             
neos/nodetypes                       4.0.7              Node type configuration for Neos
neos/nodetypes-assetlist             4.0.7              A simple asset list node type.
neos/nodetypes-basemixins            4.0.7              Base mixins which are useful across projects.
neos/nodetypes-columnlayouts         4.0.7              Various simple column layouts node type.
neos/nodetypes-contentreferences     4.0.7              A simple content reference node type.
neos/nodetypes-form                  4.0.7              A simple form node type.
neos/nodetypes-html                  4.0.7              A simple html node type.
neos/nodetypes-navigation            4.0.7              A navigation node type.
neos/party                           5.0.1              A party package for PHP based on the OASIS Customer Information Quality (CIQ) XML Standard.
neos/redirecthandler                 2.0.1              Basic API to handle HTTP redirects with the Flow Framework
neos/redirecthandler-databasestorage 2.0.1              A plugin for neos/redirecthandler to store redirects in the database
neos/redirecthandler-neosadapter     2.0.4              Neos Redirect Handler
neos/seo                             2.0.10             SEO configuration and tools for Neos
neos/setup                           4.0.4              An extensible setup tool for Neos Flow based applications
neos/site-kickstarter                4.0.7              A simple generator for Neos assets, like sites and plugins.
neos/twitter-bootstrap               3.0.0              Simple and flexible HTML, CSS, and Javascript for popular user interface components and interac...
neos/utility-arrays                  5.0.6              Flow Array Utilities
neos/utility-files                   5.0.6              Flow Files Utilities
neos/utility-lock                    5.0.6              Flow Locking Implementation
neos/utility-mediatypes              5.0.6              Flow Media Types Utilities
neos/utility-objecthandling          5.0.6              Flow array/object property and type utilities
neos/utility-opcodecache             5.0.6              Flow Opcode Cache Utilities
neos/utility-pdo                     5.0.6              Flow PDO Utilities
neos/utility-schema                  5.0.6              Flow Schema Utilities
neos/utility-unicode                 5.0.6              Flow Unicode Utilities
ocramius/package-versions            1.3.0              Composer plugin that provides efficient querying for installed package versions (no runtime IO)
ocramius/proxy-manager               2.1.1              A library providing utilities to generate, instantiate and generally operate with Object Proxies
paragonie/random_compat              v9.99.99           PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phpdocumentor/reflection-common      1.0.1              Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock    4.3.0              With this component, a library can provide support for annotations via DocBlocks or otherwise r...
phpdocumentor/type-resolver          0.4.0             
phpspec/prophecy                     1.8.0              Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage            5.2.0              Library that provides collection, processing, and rendering functionality for PHP code coverage...
phpunit/php-file-iterator            1.4.5              FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template            1.2.1              Simple template engine.
phpunit/php-timer                    1.0.9              Utility class for timing
phpunit/php-token-stream             2.0.2              Wrapper around PHP's tokenizer extension.
phpunit/phpunit                      6.0.13             The PHP Unit Testing framework.
phpunit/phpunit-mock-objects         4.0.4              Mock Object library for PHPUnit
psr/cache                            1.0.1              Common interface for caching libraries
psr/container                        1.0.0              Common Container Interface (PHP FIG PSR-11)
psr/http-message                     1.0.1              Common interface for HTTP messages
psr/log                              1.0.2              Common interface for logging libraries
psr/simple-cache                     1.0.1              Common interfaces for simple caching
ramsey/uuid                          3.8.0              Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 univer...
sebastian/code-unit-reverse-lookup   1.0.1              Looks up which function or method a line of code belongs to
sebastian/comparator                 2.0.0              Provides the functionality to compare PHP values for equality
sebastian/diff                       1.4.3              Diff implementation
sebastian/environment                2.0.0              Provides functionality to handle HHVM/PHP environments
sebastian/exporter                   3.1.0              Provides the functionality to export PHP variables for visualization
sebastian/global-state               2.0.0              Snapshotting of global state
sebastian/object-enumerator          3.0.3              Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector           1.1.1              Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context          3.0.0              Provides functionality to recursively process PHP variables
sebastian/resource-operations        1.0.0              Provides a list of PHP built-in functions that operate on resources
sebastian/version                    2.0.1              Library that helps with managing the version number of Git-hosted PHP projects
symfony/console                      v4.0.14            Symfony Console Component
symfony/css-selector                 v2.8.44            Symfony CssSelector Component
symfony/dom-crawler                  v4.0.14            Symfony DomCrawler Component
symfony/polyfill-ctype               v1.9.0             Symfony polyfill for ctype functions
symfony/polyfill-mbstring            v1.9.0             Symfony polyfill for the Mbstring extension
symfony/yaml                         v4.0.14            Symfony Yaml Component
theseer/tokenizer                    1.1.0              A small library for converting tokenized PHP source code into XML and potentially other formats
typo3fluid/fluid                     2.5.4              The TYPO3 Fluid template rendering engine
webmozart/assert                     1.3.0              Assertions to validate method input/output with nice error messages.
zendframework/zend-code              3.3.1              provides facilities to generate arbitrary code using an object oriented interface
zendframework/zend-eventmanager      3.2.1              Trigger and listen to events within a PHP application

completely vanilla (I think)

@christianm you mentioned cookies… and I think that this is probably a server environment issue, so I am looking at that.

yep, indeed!

Mmm, next step, can you see in your browser debug tools if you get a session cookie after the login?

Neos_Session:"qRvuN1k8NQcc8SFjGCWEz0WANs9Uleno"
CreationTime:"Thu, 30 Aug 2018 16:44:46 GMT"
Domain:"domain.com"
Expires:"Session"
HostOnly:true
HttpOnly:true
LastAccessed:"Thu, 30 Aug 2018 16:44:46 GMT"
Path:"/"
Secure:false
sameSite:"Unset"

…which is maybe the issue? This is being accessed over https. I mean, I don’t know, but maybe “Secure” should be “true”?

No that doesn’t matter, only the other way around would be bad because a Secure: true cookie can only be sent via https.

So, now I install a completely new base from composer… great.
Then I go to domain.com/setup/ and get the password from the console.

I enter the password, and I get redirected to enter the password (the install / setup password).

admin@metal:~/web/domain.com/public_html/Neos$ tail -f Data/Logs/S*
==> Data/Logs/Security_Development.log <==

==> Data/Logs/System_Development.log <==
18-08-30 16:57:59 4462       DEBUG                          Router route(): Route "Login" matched the request "https://domain.com/setup/login/authenticate (POST)".

==> Data/Logs/Security_Development.log <==
18-08-30 16:58:01 4462       73.26.46.113   NOTICE                         Successfully authenticated token: Password token
    [array] => 
        packageKey:
        [string] => Neos.Flow
        className:
        [string] => Neos\Flow\Security\Authentication\Provider\FileBasedSimpleKeyProvider
        methodName:
        [string] => authenticate



==> Data/Logs/System_Development.log <==
18-08-30 16:58:01 4462       INFO                           Session: Started session with id 7cD2FfApXvQ7LSh1cGcRsqPp0TJ5soMc.
18-08-30 16:58:01 4462       DEBUG                          CSRF: No token required, method Neos\Setup\Controller\LoginController::authenticateAction() is tagged with a "skipcsrfprotection" annotation
18-08-30 16:58:01 4462       ERROR                          Exception in line 184 of /home/admin/web/domain.com/public_html/Neos/Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO) - See also: 20180830165757866331.txt
18-08-30 16:58:03 4386       DEBUG                          Router route(): A cached Route with the cache identifier "80ab732aa4c1c20e2df1fd5c335812d5" matched the request "https://domain.com/setup/index?step=0 (GET)".
18-08-30 16:58:03 4386       DEBUG                          CSRF: No token required, safe request

==> Data/Logs/Security_Development.log <==
18-08-30 16:58:03 4386       73.26.46.113   INFO                           Redirecting to authentication entry point
    [array] => 
        uri:
        [string] => setup/login



==> Data/Logs/System_Development.log <==
18-08-30 16:58:03 4386       DEBUG                          Session initialization triggered by Neos\Flow\Security\Context->setInterceptedRequest.
18-08-30 16:58:03 4386       INFO                           Session: Started session with id zDp2RdmEtAyoWbdcNSLa4bW3NVnI8UwD.
18-08-30 16:58:05 4506       DEBUG                          Router route(): A cached Route with the cache identifier "fe01c5f7e107d8e4cb0aeed86cb5f1bc" matched the request "https://domain.com/setup/login (GET)".
18-08-30 16:58:05 4506       DEBUG                          CSRF: No token required, safe request
18-08-30 16:58:05 4506       ERROR                          Exception in line 184 of /home/admin/web/domain.com/public_html/Neos/Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO) - See also: 2018083016580338ed89.txt

anyway… if that doesn’t tell you anything, then I am going to give up and reinstall the server. It has to be the environment that I borked somehow.

(and thanks to you both for your time, by the way!)

My knowledge about NEOS is not good. But I experienced weird behaviour of some systems if the password has particular special characters. Which ones depends on the system. I you haven’t done yet you could try a simple password without special characters.

Okay, just to “resolve” this thread… I never did figure out what the issue was. I didn’t reinstall the server, but I did delete everything having to do with the Virtual Host, and recreated it all. Figured I would go one step at a time…

This, paradoxically, remediated the issue. Wish I could say more.